Skip to content
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

fix: change go module name to match dagger module name #6774

Merged
merged 3 commits into from Mar 5, 2024

Conversation

jedevc
Copy link
Member

@jedevc jedevc commented Feb 28, 2024

This effectively reverts #5983, since with go.work support we can't have duplicate module names inside a single namespace.

Thankfully though, we can avoid the original issue that this fixed (where go is effectively a reserved module name), by prefixing all module names with dagger/).

This helps for daggerverse-like repo structures, where the top-level go.work would ideally need to contain all the sub-modules.

@jedevc jedevc requested a review from sipsma February 28, 2024 17:23
@jedevc jedevc force-pushed the switch-to-dagger-module-name branch from 598dcaf to 2523093 Compare February 28, 2024 17:51
@jedevc jedevc added this to the v0.10.1 milestone Mar 4, 2024
@jedevc jedevc requested a review from vito March 4, 2024 10:04
@jedevc jedevc force-pushed the switch-to-dagger-module-name branch from 2523093 to 5b2f80e Compare March 4, 2024 10:06
Copy link
Member

@TomChv TomChv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand that changes.

Does it mean the generated main.go file has now the package dagger/xxx on top?
Then where is the package main file?

I'm a bit confused.

This effectively reverts 7760080, since
with go.work support we can't have duplicate module names inside a
single namespace.

Thankfully though, we can avoid the original issue that this fixed
(where `go` is effectively a reserved module name), by prefixing all
module names with `dagger/`).

Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
@jedevc jedevc force-pushed the switch-to-dagger-module-name branch from 5b2f80e to 73b692c Compare March 5, 2024 10:03
@jedevc
Copy link
Member Author

jedevc commented Mar 5, 2024

Does it mean the generated main.go file has now the package dagger/xxx on top? Then where is the package main file?

No, the package main remains the same. It's just the module dagger/xxx in go.mod changes, which avoids having the weird go.work clash we previously introduced.

@jedevc jedevc merged commit c058e26 into dagger:main Mar 5, 2024
43 checks passed
@jedevc jedevc deleted the switch-to-dagger-module-name branch March 5, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants