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

go install dlv@master is broken due to the use of 'replace' #2904

Closed
hyangah opened this issue Feb 10, 2022 · 1 comment · Fixed by #2905
Closed

go install dlv@master is broken due to the use of 'replace' #2904

hyangah opened this issue Feb 10, 2022 · 1 comment · Fixed by #2905
Labels

Comments

@hyangah
Copy link
Contributor

hyangah commented Feb 10, 2022

We observed breakage in dlv installation (microsoft/vscode-dev-containers#1300)
caused by the use of 'replace' directive.

I understand why this replacement is necessary, however, that
is not compatible with go install command. So, this need to
be addressed before the next release.

% go install github.com/go-delve/delve/cmd/dlv@master  
go: downloading github.com/go-delve/delve v1.8.2-0.20220210175055-dee4437bd088
go: github.com/go-delve/delve/cmd/dlv@master (in github.com/go-delve/[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.
@hyangah
Copy link
Contributor Author

hyangah commented Feb 10, 2022

Since replace is not an option, I think the fix is like

  1. make github.com/go-delve/liner to be the real fork (i.e. change module name in go.mod to be github.com/go-delve/liner and release it.*
  2. replace all references to github.com/peterh/liner with github.com/go-delve/liner
  3. remove replace statement in go.mod here and
  4. go mod tidy and go mod vendor
  • I tried to skip (1) and went to (2), but go mod tidy keeps insisting to put back github.com/peterh/liner

:-(

hyangah added a commit to hyangah/delve that referenced this issue Feb 13, 2022
Use of `replace` in go.mod breaks delve installation using
`go install`. (see golang/go#40276)
Workaround this limitation by explicitly require the fork
github.com/go-delve/liner.

go-delve/[email protected] already has go.mod module name fixed
to be github.com/go-delve/liner.

Fixes go-delve#2904
aarzilli pushed a commit that referenced this issue Feb 14, 2022
Use of `replace` in go.mod breaks delve installation using
`go install`. (see golang/go#40276)
Workaround this limitation by explicitly require the fork
github.com/go-delve/liner.

go-delve/[email protected] already has go.mod module name fixed
to be github.com/go-delve/liner.

Fixes #2904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants