Unexpected `.` in generated file names results in `buf` warning
まだ誰も着手していません。
評価
- 難易度
- 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分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
protocolbuffers/protobuf-javascript のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
protocolbuffers/protobuf-javascript#248 · コメント 1 件 · リアクション 13 件 ·
-
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 件 ·
protocolbuffers/protobuf-javascript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
Issue-Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sugarlabs/musicblocks#8924 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled オープンcustomer-eng status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100