Open jonasagx opened 2 years ago
I think we might not need to pursue our own solution to creating a version for the main module. This Go proposal was just accepted, so hopefully we can find the version value we need directly in Go binaries in the future.
Hi there! Paketo buildpacks maintainer, here. We're seeing our end-users have issues with the current empty-string format for the main module version because it breaks their SBOM-merging. Would love to see a fix that places some reasonable default in that empty field.
As pointed out by the author of https://github.com/paketo-buildpacks/go-build/issues/302 this issue affects binaries compiled by a go compiler version < 1.18.
I agree that a reasonable default should exist for compatibility with older binaries, but there are open questions:
Hi @fg-j and @ryanmoran — thanks for the feedback! To consolidate communication, we'll track the "missing version
field" problem in #959. Thanks for raising this! 🙏
What would you like to be added: we could toy with changing the version to be in the format of v0.0.0-- if we could derive the date correctly from the build info (which I'm not certain is possible). This would make it consistent to go module version formatting.
Why is this needed: Main module could offer better version info in a similar go.mod version format.
Additional context: Idea came up while adding support to go1.18 debug BuildInfo