-
Notifications
You must be signed in to change notification settings - Fork 3
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
copy files from master post go1.22.1 #10
Conversation
This copies the state of regexp package at commit 2e1003e2f7e42efc5771812b9ee6ed264803796c which occurred sometime after go1.22.1 but before any other release. We remove the use of internal after copying. Additionally we bump the minimum supported version of go to 1.21 due to the features now used. Test Plan: go test ./...
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.
Thanks for this, and sorry for the long wait to look at it.
Reading through, I noticed these changes:
- Most changes are formatting of comments.
- A few tests are extended.
slices.Equal
andslices.Sort
used where appropriate.- Named capture syntax extended.
A more complete list can be found at https://github.com/golang/go/commits/2e1003e2f7e42efc5771812b9ee6ed264803796c/src/regexp
The last change included is golang/go@51a96f8.
I don't expect any of thses changes to impact the optimisations (on the speedups
branch).
for i := range b.visited { | ||
b.visited[i] = 0 | ||
} | ||
clear(b.visited) // set to 0 |
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.
reviewing note: clear
was added in Go 1.21 so this change is OK for projects that target last two versions.
if size < 1 { | ||
size = 1 | ||
} | ||
size = max(1, size) |
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.
note max
and min
were added in Go 1.21
This brings in grafana/regexp#11, so that long lists of alternates that escape FastRegexpMatcher will get sorted and hence execute faster. The bulk of this PR is grafana/regexp#10 which brings the library up-to-date with Go 1.22.1; mostly cosmetic but a couple of code improvements.
This brings in grafana/regexp#11, so that long lists of alternates that escape FastRegexpMatcher will get sorted and hence execute faster. The bulk of this PR is grafana/regexp#10 which brings the library up-to-date with Go 1.22.1; mostly cosmetic but a couple of code improvements.
This brings in grafana/regexp#11, so that long lists of alternates that escape FastRegexpMatcher will get sorted and hence execute faster. The bulk of this PR is grafana/regexp#10 which brings the library up-to-date with Go 1.22.1; mostly cosmetic but a couple of code improvements.
This brings in grafana/regexp#11, so that long lists of alternates that escape FastRegexpMatcher will get sorted and hence execute faster. The bulk of this PR is grafana/regexp#10 which brings the library up-to-date with Go 1.22.1; mostly cosmetic but a couple of code improvements.
This brings in grafana/regexp#11, so that long lists of alternates that escape FastRegexpMatcher will get sorted and hence execute faster. The bulk of this PR is grafana/regexp#10 which brings the library up-to-date with Go 1.22.1; mostly cosmetic but a couple of code improvements.
This copies the state of regexp package at commit golang/go@2e1003e which occurred sometime after go1.22.1 but before any other release. We remove the use of internal after copying.
Additionally we bump the minimum supported version of go to 1.21 due to the features now used.
Test Plan: go test ./...