-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
proposal: cmd/go: allow fine-grained go build constraints for go version #71951
Comments
I believe this is one of the reasons we removed support for binary only packages, I don't see it making it's way back. |
My example was specific to my use-case. The proposal is more general in terms of use-cases. Perhaps a Go patch version has a bug that you want your build to avoid. And that's not to mention the inconsistency with @ianlancetaylor What do you think? |
I think this is separate from binary-only packages. |
I think we'd want to have strong use cases to consider adding a feature like this, given the increased complexity.
Could you explain your use case more? I don't fully understand it. |
My use-case is essentially to create a plugin package that works on any os,arch,go version. I am basically embedding the Go object files and adding build constraints to limit the package size. i.e. If go1.23 has 6 patch versions, currently because I can't add build constraints for each patch version, I have to embed each 6 Object files into the package under the I know what I'm doing is frowned upon by the Elders so it will have no persuasive value. However, I was hoping these facts will be more persuasive:
|
Proposal Details
It would be great if
*.go
files can allow more fine-grained version constraints.The
go.mod
file permits it - so it seems like an incongruency.My project is dealing with compiled object files which have been compiled on a very specific go version/OS/arch. It is important to be able to differentiate between different versions of go with precision.
The text was updated successfully, but these errors were encountered: