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

[BUG] go install method is broken due to replace directive in go.mod #1980

Open
yfzhou0904 opened this issue Jan 3, 2025 · 1 comment
Open
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@yfzhou0904
Copy link

yfzhou0904 commented Jan 3, 2025

Expected Behavior

go install github.com/kubernetes/kompose@latest should work with the latest go cli

Actual Behavior

$ go install github.com/kubernetes/kompose@latest
go: github.com/kubernetes/kompose@latest (in github.com/kubernetes/[email protected]):
	The go.mod file for the module providing named packages contains one or
	more replace directives. It must not contain directives that would cause
	it to be interpreted differently than if it were the main module.

Steps To Reproduce

No response

Kompose Version

v1.35.0

Docker-Compose file

No response

Anything else?

the go mod replace directive is added in v1.35.0, so installing github.com/kubernetes/[email protected] works.

No response

@yfzhou0904 yfzhou0904 added the kind/bug Categorizes issue or PR as related to a bug. label Jan 3, 2025
@AmarNathChary
Copy link

We should consider removing the replace directives from their go.mod file or restructuring the project so that these directives do not affect. The common approach is to include such directives only in a development-specific go.mod file, outside of the main module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants