Skip to content

Conversation

kyu08
Copy link
Contributor

@kyu08 kyu08 commented Aug 23, 2025

Caution

This PR is WIP.
I'll investigate effect of bumping. And I'll use this branch few days for testing.
Then I'll write PR body and open this PR.

PR Description

This PR includes 2 changes:

  1. This PR bumps Go to 1.25.
    • Bumped to Go 1.25 in go.mod
    • Bumped to Go 1.25 in ci.yml
    • Bumped base image to golang:1.25 in Dockerfile
    • Bumped golangci-lint version to v2.4.0
  2. Use ignore directive to ignore test directory in go.mod
    • After merging this PR, we can make make format target simple. No more git ls-files '*.go' ':!vendor' stuff.

Reference

Concerns

TODO(@kyu08): Add any additional concerns here if they exist.

CI fails POTENTIAL DEADLOCK

Actual GitHub Actions log: https://github.com/jesseduffield/lazygit/actions/runs/17170711484/job/48719767790?pr=4844

Running integration tests with git version 2.32.0
--- FAIL: TestIntegration (1.67s)
    runner.go:88: Skipping test commit/create_fixup_commit_in_branch_stack for git version 2.32.0
    runner.go:62: retrying test worktree/worktree_in_repo
    runner.go:62: retrying test bisect/basic
    --- FAIL: TestIntegration/bisect/basic (0.37s)
        go_test.go:50: 
            	Error Trace:	/home/runner/work/lazygit/lazygit/pkg/integration/clients/go_test.go:50
            	Error:      	Received unexpected error:
            	            	POTENTIAL DEADLOCK: Recursive locking:
            	            	current goroutine 0 lock 0xc00030c3ac
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:500 helpers.(*RefreshHelper).refreshBranches { self.c.Mutexes().LocalCommitsMutex.Lock() } <<<<<
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:499 helpers.(*RefreshHelper).refreshBranches { // branch heads might have changed }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:130 helpers.(*RefreshHelper).Refresh.func2.3 { } else { }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:[10](https://github.com/jesseduffield/lazygit/actions/runs/17170711484/job/48719767790?pr=4844#step:9:11)6 helpers.(*RefreshHelper).Refresh.func2.1.1 { f() }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/gui.go:722 gocui.(*Gui).onWorkerAux {  }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/task.go:22 gocui.(*TaskImpl).Done { func (self *TaskImpl) Done() { }
            	            	
            	            	Previous place where the lock was grabbed (same goroutine)
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:318 helpers.(*RefreshHelper).refreshCommitsWithLimit { self.c.Mutexes().LocalCommitsMutex.Lock() } <<<<<
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:317 helpers.(*RefreshHelper).refreshCommitsWithLimit { func (self *RefreshHelper) refreshCommitsWithLimit() error { }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:273 helpers.(*RefreshHelper).refreshCommitsAndCommitFiles { _ = self.refreshCommitsWithLimit() }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:106 helpers.(*RefreshHelper).Refresh.func2.1.1 { f() }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/gui.go:722 gocui.(*Gui).onWorkerAux {  }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/task.go:22 gocui.(*TaskImpl).Done { func (self *TaskImpl) Done() { }
            	            	
            	            	Other goroutines holding locks:
            	            	goroutine 0 lock 0xc00030c394
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:508 helpers.(*RefreshHelper).refreshFilesAndSubmodules { self.c.Mutexes().RefreshingFilesMutex.Lock() } <<<<<
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:507 helpers.(*RefreshHelper).refreshFilesAndSubmodules { func (self *RefreshHelper) refreshFilesAndSubmodules() error { }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:153 helpers.(*RefreshHelper).Refresh.func2.8 { _ = self.refreshFilesAndSubmodules() }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:106 helpers.(*RefreshHelper).Refresh.func2.1.1 { f() }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/gui.go:722 gocui.(*Gui).onWorkerAux {  }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/task.go:22 gocui.(*TaskImpl).Done { func (self *TaskImpl) Done() { }
            	            	
            	            	goroutine 0 lock 0xc00030c39c
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:453 helpers.(*RefreshHelper).refreshBranches { self.c.Mutexes().RefreshingBranchesMutex.Lock() } <<<<<
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:452 helpers.(*RefreshHelper).refreshBranches { func (self *RefreshHelper) refreshBranches(refreshWorktrees bool, keepBranchSelectionIndex bool, loadBehindCounts bool) { }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:[13](https://github.com/jesseduffield/lazygit/actions/runs/17170711484/job/48719767790?pr=4844#step:9:14)0 helpers.(*RefreshHelper).Refresh.func2.3 { } else { }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:106 helpers.(*RefreshHelper).Refresh.func2.1.1 { f() }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/gui.go:722 gocui.(*Gui).onWorkerAux {  }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/task.go:22 gocui.(*TaskImpl).Done { func (self *TaskImpl) Done() { }
            	            	
            	            	goroutine 0 lock 0xc0009ce4a8
            	            	../../../../../../pkg/commands/git_commands/main_branches.go:42 git_commands.(*MainBranches).Get { self.mutex.Lock() } <<<<<
            	            	../../../../../../pkg/commands/git_commands/main_branches.go:41 git_commands.(*MainBranches).Get { func (self *MainBranches) Get() []string { }
            	            	../../../../../../pkg/commands/git_commands/commit_loader.go:103 git_commands.(*CommitLoader).GetCommits { var remoteUnmergedCommitHashes *set.Set[string] }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:3[21](https://github.com/jesseduffield/lazygit/actions/runs/17170711484/job/48719767790?pr=4844#step:9:22) helpers.(*RefreshHelper).refreshCommitsWithLimit { checkedOutRef := self.determineCheckedOutRef() }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:273 helpers.(*RefreshHelper).refreshCommitsAndCommitFiles { _ = self.refreshCommitsWithLimit() }
            	            	../../../../../../pkg/gui/controllers/helpers/refresh_helper.go:106 helpers.(*RefreshHelper).Refresh.func2.1.1 { f() }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/gui.go:7[22](https://github.com/jesseduffield/lazygit/actions/runs/17170711484/job/48719767790?pr=4844#step:9:23) gocui.(*Gui).onWorkerAux {  }
            	            	../../../../../../vendor/github.com/jesseduffield/gocui/task.go:22 gocui.(*TaskImpl).Done { func (self *TaskImpl) Done() { }

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@stefanhaller
Copy link
Collaborator

In the PR description I'm missing a motivation for making this change. Is the make format thing the only motivation? In that case I vote against doing this now. It's a potentially disruptive change for developers (as some of the discussion in #4393 illustrates), so we should have a really good reason to bump the requirement, and the make format thing is not nearly important enough. Any other reasons?

@kyu08
Copy link
Contributor Author

kyu08 commented Aug 24, 2025

Thanks for the review!

In the PR description I'm missing a motivation for making this change. Is the make format thing the only motivation? In that case I vote against doing this now.

The biggest motivations for this PR are below:

  • Improve development productivity by using new Go feature.
  • Keeping dependencies in a state that doesn't block bumping libraries allows for quick adoption of security patches and new features.

It's a potentially disruptive change for developers (as some of the discussion in #4393 illustrates),

What do you mean by "potentially disruptive change for developers" in this context?
If my understanding is correct, you're claiming that specifying a version without patch version like go 1.25 in go.mod leads to confusion for developers who using Go which is lower version than 1.22.

If so, I think specifying the version with the patch version in go.mod like go 1.25.0 would solve above problem.

If you think that bumping to Go 1.25 would introduce more elements that could lead to developer confusion than we currently have, I'd like to know about that.

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.

2 participants