Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unexpected `.` in generated file names results in `buf` warning

オープン
#148 コメント 2 件 リアクション 11 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
tooling

調査の方向性

示されている buf generate コマンド、buf.gen.yaml テンプレート、Linux 上の plugin v3.21.2 で警告を再現し、生成されたパスを protoc の直接出力と比較します。参照されている plugin.proto の生成仕様に照らしてプラグインの出力を追跡します。buf が先頭に "." コンポーネントを持たない相対ファイル名を受け取り、警告を出さなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

good first issue P3 triaged

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

protocolbuffers/protobuf-javascript のほかの issue

protocolbuffers/protobuf-javascript の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。