Unexpected `.` in generated file names results in `buf` warning
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- javascript
- Domaine
- tooling
Piste de recherche
Reproduisez l’avertissement avec la commande buf generate indiquée, le modèle buf.gen.yaml et le plugin v3.21.2 sous Linux, puis comparez le chemin généré avec la sortie directe de protoc. Suivez la sortie du plugin par rapport à la spécification de génération de plugin.proto référencée ; c’est terminé lorsque buf reçoit un nom de fichier relatif sans composant "." initial et n’émet plus d’avertissement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- JavaScript
- Étoiles
- 471
- Forks
- 91
- Merge moyen
- 3 h 57 min
- PR mergées (30 j)
- 2
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de protocolbuffers/protobuf-javascript
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
protocolbuffers/protobuf-javascript#248 · 1 commentaire · 13 réactions ·
-
question
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
protocolbuffers/protobuf-javascript#222 · 9 commentaires ·
-
Why map.js sort keys? Ouverteenhancement port-fix triaged
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
protocolbuffers/protobuf-javascript#185 · 1 commentaire ·
-
enhancement port-fix triaged
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
protocolbuffers/protobuf-javascript#182 · 3 commentaires · 1 réaction ·
Toutes les issues de protocolbuffers/protobuf-javascript
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
area-deployment area-integrations triage:bot-seen
Difficulté 2/5 Une demi-journée Accessibilité débutants 86/100
-
Issue-Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
sugarlabs/musicblocks#8924 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Ouvertecustomer-eng status: needs triage
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100