Unexpected `.` in generated file names results in `buf` warning
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- tooling
调研方向
使用所示的 buf generate 命令、buf.gen.yaml 模板和 Linux 上的 plugin v3.21.2 重现该警告,然后将生成的路径与 protoc 的直接输出进行比较。根据所引用的 plugin.proto 生成规范跟踪插件输出;当 buf 接收到不带前导 "." 组件的相对文件名且不再发出警告时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
When using the plugin v3.21.2 through buf on Linux (Ubuntu), I'm getting the following warning:
Warning: Generated file name "./some/path/to/file/my_message_pb.js" does not conform to the Protobuf generation specification. Note that the file name must be relative, use "/" instead of "", and not use "." or ".." as part of the file name. Buf will continue without error here, but please raise an issue with the maintainer of the plugin and reference https://github.com/protocolbuffers/protobuf/blob/95e6c5b4746dd7474d540ce4fb375e3f79a086f8/src/google/protobuf/compiler/plugin.proto#L122
...which is rather self-explanatory. I suspect this might be because of the . at the beginning.
The buf command I was using is the following:
buf generate /path/to/protos --template buf.gen.yaml -o /output/location
(i.e. I used full path for both - input and output paths)
buf generation template is
version: v1
plugins:
- name: js
out: .
opt: import_style=commonjs
I tried changing out to not be . to no avail.
There are no warnings when plugin is used through protoc directly, but I think the buf is right that returned file path should not have . components.
- 主要语言
- JavaScript
- 星标
- 471
- 派生
- 91
- 平均合并
- 3 小时 57 分钟
- 30 天内合并 PR
- 2
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
protocolbuffers/protobuf-javascript 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 30/100
protocolbuffers/protobuf-javascript#248 · 1 条评论 · 13 个 reaction ·
-
question
难度 3/5 1-2 天 新手友好度 45/100
protocolbuffers/protobuf-javascript#222 · 9 条评论 ·
-
enhancement port-fix triaged
难度 4/5 3-5 天 新手友好度 35/100
protocolbuffers/protobuf-javascript#185 · 1 条评论 ·
-
enhancement port-fix triaged
难度 4/5 3-5 天 新手友好度 35/100
protocolbuffers/protobuf-javascript#182 · 3 条评论 · 1 个 reaction ·
查看 protocolbuffers/protobuf-javascript 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 1/5 1 小时以内 新手友好度 90/100
TheOdinProject/curriculum#31423 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
WGBH-MLA/dream-aapb#69 ·
-
难度 1/5 1-3 小时 新手友好度 78/100
Mintplex-Labs/anything-llm#6490 ·
-
难度 1/5 1 小时以内 新手友好度 86/100
openlayers/ol-cesium#1364 ·