Closed CoolGoose closed 1 year ago
Hey, thanks for the report! I'm having trouble reproducing this.
Can you confirm that this is your directory structure:
buf.work.yaml
buf.gen.yaml
proto/
buf.yaml
buf.lock
auth/v1/
auth.proto
And you are executing buf generate
from the same directory as the buf.gen.yaml
?
This won't fix your issue, but you can also remove the lint.ignore
directive from buf.yaml
(dependencies aren't linted), and make sure that you add an except
to managed mode so that dependencies are imported from the correct go package.
Hey @rodaine thanks for the quick reply 🥂
My directory structure is actually
proto/
auth/v1/
auth.proto
buf.gen.yaml
buf.lock
buf.work.yaml
buf.yaml
I did remove the lint + added the except to managed mode in buf.yml
but it didn't do the trick
Moving buf.yaml + buf.lock
did indeed fix it, so I apologise for the mixup. I do wonder by which luck this made it work before
I believe the CLI gets confused here because buf.work.yaml
indicates proto
as a buf module directory. When buf generate
runs, it consults buf.work.yaml
for the modules to target, and then looks in the proto
directory for a buf.yaml
. Since there wasn't one, it assumes it's the default settings (without the protovalidate dependency), and as a result cannot resolve a path for buf/validate/validate.proto
.
Description
I am somehow making it so that I can't use the new validate beta
Steps to Reproduce
buf.lock
version: v1 directories:
Expected Behavior
Being able to run
buf generate
Actual Behavior
proto/auth/v1/auth.proto:5:8:proto/buf/validate/validate.proto: does not exist
Environment