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

Installation of v.0.40.0 fails with go install #2885

Closed
cdillond opened this issue Aug 5, 2023 · 2 comments · Fixed by #2888
Closed

Installation of v.0.40.0 fails with go install #2885

cdillond opened this issue Aug 5, 2023 · 2 comments · Fixed by #2888
Labels
bug Something isn't working

Comments

@cdillond
Copy link

cdillond commented Aug 5, 2023

Describe the bug
Installation of lazygit v0.40.0 using go install fails due to a replace directive in the go.mod file.

To Reproduce
Steps to reproduce the behavior:

  1. Run go install github.com/jesseduffield/lazygit@latest
  2. When I do this, the following message appears:
go: github.com/jesseduffield/lazygit@latest (in github.com/jesseduffield/[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.

Expected behavior
I expected lazygit to install successfully.

Version info:
I was able to avoid the issue by running go install github.com/jesseduffield/[email protected] instead.

Additional context
Per the Go docs (and this other github issue), go install doesn't work with replace directives.

I think this might be the source of the problem.
replace github.com/gdamore/tcell/v2 v2.6.0 => github.com/stefanhaller/tcell/v2 v2.6.16

@cdillond cdillond added the bug Something isn't working label Aug 5, 2023
@stefanhaller
Copy link
Collaborator

This is being discussed in golang/go#44840, it's a problem in golang's module system that people seem to disagree about whether or how it should be solved.

For the time being, the solution seems to be to not use a replace directive for tcell, but import the fork for real. Starting work on this in jesseduffield/gocui#37.

@stefanhaller
Copy link
Collaborator

While this should be solved by #2888, it will of course still not work until we make a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants