sequential: use os.OpenFile with O_FILE_FLAG_SEQUENTIAL_SCAN on Go 1.26+#216
Open
tonistiigi wants to merge 2 commits intomoby:mainfrom
Open
sequential: use os.OpenFile with O_FILE_FLAG_SEQUENTIAL_SCAN on Go 1.26+#216tonistiigi wants to merge 2 commits intomoby:mainfrom
tonistiigi wants to merge 2 commits intomoby:mainfrom
Conversation
Go 1.26 adds support for passing Windows file flags via os.OpenFile, eliminating the need to call windows.CreateFile directly. Split the implementation into build-tagged files: go1.26+ uses os.OpenFile with the new O_FILE_FLAG_SEQUENTIAL_SCAN open flag, while older versions retain the manual CreateFile approach. Also bump golang.org/x/sys to v0.37.0 (provides the new constant) and update the minimum Go version to 1.24. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
The "Set PACKAGES env" step used "go list -m" to check each module's required Go version, but Go 1.18 cannot parse the three-component go directive format (e.g. "go 1.24.0") introduced in Go 1.21. Switch to awk to read the version from go.mod and sort -V for semantic version comparison. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Go 1.26 adds support for passing Windows file flags via os.OpenFile, eliminating the need to call windows.CreateFile directly. Split the implementation into build-tagged files: go1.26+ uses os.OpenFile with the new O_FILE_FLAG_SEQUENTIAL_SCAN open flag, while older versions retain the manual CreateFile approach.
Also bump golang.org/x/sys to v0.37.0 (provides the new constant) and update the minimum Go version to 1.24.
https://go-review.googlesource.com/c/go/+/699415
https://go-review.googlesource.com/c/go/+/724621