suggestion: add DO NOT EDIT comment to generated bindings files
Generated bindings files should indicate that they are generated with an auto-generated DO NOT EDIT comment at top of the file. This is not needed for Rust, but any language like c where the bindings are part of the project should have this comment.
// Code generated by wit-bindgen DO NOT EDIT.
// Version:
// Revision:
// Build Date:
// Built By:
Many editors recognize this string and warn when editing the file. Many tools include build-level information for triage. This might be especially useful for wit-bindgen while breaking changes are still frequent.
:+1: to adding comments to the generated bindings.
I'm curious about the need for Version/Revision/Build Date/Built By fields. At first glance, it seems like version-control systems do a good job of tracking this information already.
I included this snippet from what I've seen when the generator is a CLI and not managed as a dependency, e.g. not in go.mod/go.sum, Cargo.toml, etc.
go-enum is an example: https://github.com/abice/go-enum/blob/8268238fd705b39d430e7d8682b527af8452b6ab/generator/enum.tmpl#L1-L6
So if wit-bindgen were run as a CLI because it was provided as a globally installed tool in a build container, the version used might not be captured in git.
To be honest, most of those fields seemed redundant to me, but I figured I'd drop the superset of what I've seen and we can pick from that.
This has been fixed by #490; it appears GitHub didn't auto-close this issue.