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

copy files from master post go1.22.1 #10

Merged
merged 1 commit into from
May 18, 2024
Merged

Conversation

keegancsmith
Copy link
Contributor

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 ./...

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 ./...
@CLAassistant
Copy link

CLAassistant commented Mar 28, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@bboreham bboreham left a 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 and slices.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
Copy link
Collaborator

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)
Copy link
Collaborator

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

@bboreham bboreham merged commit a468a5b into grafana:main May 18, 2024
1 check passed
bboreham added a commit to grafana/mimir that referenced this pull request May 30, 2024
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.
bboreham added a commit to grafana/mimir that referenced this pull request May 30, 2024
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.
bboreham added a commit to grafana/mimir that referenced this pull request May 30, 2024
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.
bboreham added a commit to grafana/mimir that referenced this pull request May 30, 2024
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.
narqo pushed a commit to narqo/grafana-mimir that referenced this pull request Jun 6, 2024
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.
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.

None yet

3 participants