-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buf generate: fails on symlinks without proper permissions #265
Comments
I saw this error too, I think it may have something to do with how the grpc-gateway uses a docker container to generate the files. buf/internal/pkg/app/app_unix.go Line 70 in 4d19835
buf/internal/pkg/app/appname/container.go Line 82 in 4d19835
Another note, because running generate inside a container can mess with permissions, you may need to run |
I found this code and tried to use these envs but with no luck (I tried also with
You are right with the docker and permissions being broken but after I fixed it, it's the same error. I can try to dig into the code of buf to find a code path that does not work if it's hard to reproduce. Like I said above, it works like a charm on macOS. |
I can't reproduce this error locally anymore, but it would be super helpful if you could keep your environment broken and help us debug what's happening here. I'd add some print statements to the code to see why it's choosing that path and rebuild, if you want I can provide the binaries for you to try? |
I talked with @johanbrandhorst on Buf's Slack. We found that the root cause was a broken symlink pointing at a directory to which the current user had no permissions. I updated the description. |
In the next release we're making the error message around this a bit clearer so the user knows to look at the contents of their repository. |
An updated error message is included in v0.37.1. |
I tried to run
buf generate
with one dependency:and a broken symlink in the root project directory.
The command failed on resolving the symlink:
Where a symlink pointed at:
/root/.cache/bazel/path/to/file
.The text was updated successfully, but these errors were encountered: