-
Notifications
You must be signed in to change notification settings - Fork 13
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
Symlink creation fails for non-privileged Windows user #106
Comments
I'm hesitant to bring back that old code path (before symlinks, this plugin did copy dependencies into one directory). If two modules declare the same file then we'd have to decide who wins, and it's also not clear to me that there's a good way to catch those conflicts using the standard Gradle Copy task machinery. Using symlinks allows Buf to deal with that conflict resolution (i.e., it fails the build). Is it not possible to run the build with the right permissions? |
Unfortunately no. As workaround, I’ve injected task that re-creates entire folder structure before CreateSymLinksToModulesTask. The workaround relies on this check https://github.com/andrewparmet/buf-gradle-plugin/blob/55c64c738361a5b5be23a9a4181ecf85006a203d/src/main/kotlin/com/parmet/buf/gradle/ProtobufGradlePluginSupport.kt#L63 |
Hi
The gradle build just runs through and is okay, but the linting does not happen at all.
When using version 0.9.1 of the google protobuf plugin, the plugin seems to work but I run into the following issue:
Is there any fix to this problem? I am running it on Windows as a non-privileged user. |
As of plugin version 0.8.5 you must use the protobuf-gradle-plugin version 0.9.2 or higher. Can you provide a minimal reproducer for the first configuration that doesn't lint? Note that you need to have the privilege to create symlinks. |
On my side, as pointed out in this StackOverflow comment, I've enabled Developer Mode on my Windows machine and now the Buf plugin works as-is, no task injection required. Note that one has to use JDK 13 at least for this work (see JDK-8218418). |
Plugin version: 0.8.2
I guess something similar to https://github.com/golang/dep/pull/781/files#diff-ef03141dd8338143c09a5b30ceb3d079d25015a96f8b5292ee29daa23348df2e needs to be done, i.e. wrap symlink creation in try/catch and if failed and
$os == windows
then fallback to copying extracted and included proto dependencies.Quick search reveals that this is only case for non-privileged Windows users, and admin user will be able to create symlinks without issues.
The text was updated successfully, but these errors were encountered: