-
Notifications
You must be signed in to change notification settings - Fork 110
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.mod: update to go 1.22.1 #743
Conversation
Our CI pipeline uses apline:edge which now ship with 1.22. I noticed that matchree_test.go doesn't pass anymore. There seem to have been changes in regex package which we catch in our tests. test plan: go test ./... and CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I would hold of merging or maybe come up with an atlernative plan (eg afjust the regex we use in tests). The reason I would hold off merging is that once this goes in we can only update zoekt in sourcegraph once sourcegraph is on 1.22. I'm asking here about that https://sourcegraph.slack.com/archives/C04MYFW01NV/p1708689525857339
@@ -1115,7 +1115,7 @@ func (d *indexData) newMatchTree(q query.Q, opt matchTreeOpt) (matchTree, error) | |||
|
|||
return &symbolRegexpMatchTree{ | |||
regexp: regexp, | |||
all: regexp.String() == "(?i)(?-s:.)*", | |||
all: regexp.String() == "(?i)(?-s:.*)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably not be looking at string output here to decide this. This is super fragile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realised that because this PR hasn't landed but on sourcegraph we build with go1.22 there is likely a regression here until this PR lands. Filed https://github.com/sourcegraph/sourcegraph/issues/61017
I am making this PR pass CI and work on main. I accidentally pushed to origin/main some of the fixes already hence the merges with origin/main |
Our CI pipeline uses alpine:edge which now ships with Go 1.22. I noticed, because
matchree_test.go
doesn't pass anymore on CI. There seem to have been changes in the regexp package which we catch in our tests. I couldn't find anything in the release notes, but this could be related.Here is an example. Toggle between 1.21 and 1.22 to see the difference.
test plan:
go test ./... and CI