-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: configure -buildvcs via environment variable #52308
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
Comments
I suspect that your use-case will be fixed more simply by CL 398855. |
Ironically, I originally had this comment in #51478 and was concerned that would muddy the issue. But yes, if we default to |
@bcmills I'm happy to close this one if there's no further action needed and |
I don't think |
Ah, I understand now. That's fine too! |
Duplicate of #51748 |
Would there be any appetite for an environment variable alternative that configures the
-buildvcs
flag?Use case - in order to build my project with 1.18 I need to set
-buildvcs=false
- our repository layout breaks the "main package and the main module containing it are in the repository containing the current directory rule."If I unconditionally set
-buildvcs=false
, the project builds successfully on Go 1.18, but fails on 1.17 because it doesn't understand the-buildvcs
flag. In order to support both Go versions, I have to add logic to handle version-specific flags.Something like an environment variable would allow builds on 1.17 and 1.18 to succeed.
The text was updated successfully, but these errors were encountered: