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.mod: update to go 1.22.1 #743

Merged
merged 7 commits into from
Mar 12, 2024
Merged

go.mod: update to go 1.22.1 #743

merged 7 commits into from
Mar 12, 2024

Conversation

stefanhengl
Copy link
Member

@stefanhengl stefanhengl commented Feb 23, 2024

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

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
@sourcegraph sourcegraph deleted a comment from github-actions bot Feb 23, 2024
@sourcegraph sourcegraph deleted a comment from github-actions bot Feb 23, 2024
@stefanhengl stefanhengl marked this pull request as ready for review February 23, 2024 11:20
@stefanhengl stefanhengl requested a review from a team February 23, 2024 11:20
@sourcegraph sourcegraph deleted a comment from github-actions bot Feb 23, 2024
Copy link
Member

@keegancsmith keegancsmith left a 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:.*)",
Copy link
Member

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.

Copy link
Member

@keegancsmith keegancsmith Mar 12, 2024

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

@keegancsmith
Copy link
Member

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

@keegancsmith keegancsmith changed the title go.mod: update to go 1.22.0 go.mod: update to go 1.22.1 Mar 12, 2024
@keegancsmith keegancsmith merged commit 52a28e3 into main Mar 12, 2024
8 checks passed
@keegancsmith keegancsmith deleted the sh/go-1.22 branch March 12, 2024 08:28
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