You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We often create a monorepo with to assemble all related packages. but we use them for different purpose.
As the example,
The root package github.com/go-courier/enumeration as core modules.
The github.com/go-courier/enumeration/generator for go generate.
They have different dependences, and we couldn't put all dependences into the go.mod in root package, because we don't want to includes unnecessary dependences when we just use github.com/go-courier/enumeration
However, after we added go.mod under github.com/go-courier/enumeration/generator to isolate their owner dependences. The problem comes.
github.com/go-courier/enumeration/generator requires github.com/go-courier/enumeration
and we have to commit root codes first as one version,
and commit again just with upgrading dependences of github.com/go-courier/enumeration/generator to solve dependences issue of sub package.
This may make a little trouble for maintaining monorepo.
Could we let sub packages use the same version of root package. with marking version ~ or other token?
morlay
changed the title
x/vgo: problems with sub packages in one repo.
x/vgo: proposal: let sub packages could use the same version of root package in monorepo.
Jun 27, 2018
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
Here the example https://github.com/go-courier/enumeration
We often create a monorepo with to assemble all related packages. but we use them for different purpose.
As the example,
github.com/go-courier/enumeration
as core modules.github.com/go-courier/enumeration/generator
forgo generate
.They have different dependences, and we couldn't put all dependences into the
go.mod
in root package, because we don't want to includes unnecessary dependences when we just usegithub.com/go-courier/enumeration
However, after we added
go.mod
undergithub.com/go-courier/enumeration/generator
to isolate their owner dependences. The problem comes.github.com/go-courier/enumeration/generator
requiresgithub.com/go-courier/enumeration
and we have to commit root codes first as one version,
and commit again just with upgrading dependences of
github.com/go-courier/enumeration/generator
to solve dependences issue of sub package.This may make a little trouble for maintaining monorepo.
Could we let sub packages use the same version of root package. with marking version
~
or other token?like below:
meanings sub package
github.com/go-courier/enumeration/generator
will use the same version ofgithub.com/go-courier/enumeration
The text was updated successfully, but these errors were encountered: