-
Notifications
You must be signed in to change notification settings - Fork 12
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
Encode version to the header of generated files #210
Comments
Because generated Go code is written to the filesystem and committed, this means that updating the version of Second, this is only available when examining the source code. What if we implemented something for each generated package along the lines of Go’s package cm
// BuildInfo contains debugging information about the WIT package
// and toolchain that generated a Go package.
type BuildInfo struct {
WITPackage string // "wasi:http"
WITVersion string // "0.2.0"
Generator string // "wit-bindgen-go"
GeneratorVersion string // "0.3.1"
} Then each generated Go package could have a |
I like the idea of reducing noisy diffs. How will this impact our release process? Do we need to bump up this version whenever we release a new version? The release CI knows the tag version. Maybe |
We can generate this in code. The package cm struct would only be used for the API. The values would be generated in a build.go file. |
Ah okay that makes sense! |
Essentially, replace
to
The text was updated successfully, but these errors were encountered: