-
Notifications
You must be signed in to change notification settings - Fork 13
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: put package cm in its own module #261
Comments
I think this is the right step to reduce downstream dependency footprints and clarify its role as a standalone package to be imported by many Go programs that use cm types, especially when I added wazero as a dependency in #252. The version lockstep makes sense.
Regarding breaking changes, personally I think it's fine since we are in a pre 1.0 version. Something to consider: we can provide a grace period where |
If a program already depends on I’ll try prototyping this elsewhere to verify this can happen. |
It looks like updating the tags in lock step is not possible, particularly when the root module depends on module
|
👍 |
Thanks everyone! |
Problem
Currently, there is a single Go module (
go.bytecodealliance.org
) with a go.mod file at the root of this repository. The root module includes a number of dependencies, all of which are used in packages such aswit
andwit/bindgen
for development-time code generation.Package
cm
is the sole runtime package in this module, intended to be imported by programs that import code generated bywit-bindgen-go
. Packagecm
has no dependencies other than the Go standard library, which makes it suitable for inclusion into a wide variety of Go programs (including the Go standard library).Proposal
We propose to put package
cm
into its own module:go.bytecodealliance.org/cm
. This would be a breaking change, requiring users to directly add the module to their go.mod file viago get go.bytecodealliance.org/cm
.cm
would remain this repo.cm
would remain the same:go.bytecodealliance.org/cm
.cm
, etc.) would need its own version. Modulecm
would start with its own version tagcm/v0.1.0
, and the root module would be updated to depend on it.cm
.Tagging
One consideration is the versioning of package
cm
(and therefore the module it sits in). Go can import modules in a subdirectory of a repo as long as a version tag exists that match the directory name (package path). To release a new version of packagecm
, we must create a new tag, e.g.cm/v0.1.0
.Dependencies
Currently, packages in the root module depend on package
cm
(but not vice-versa). Changes to packagecm
that the root module depends on will need to be executed in sequence.Implementation
An implementation of this proposal is at #255.
Tasks
The text was updated successfully, but these errors were encountered: