microsoft / go-winio

Win32 IO-related utilities for Go
MIT License
939 stars 181 forks source link

Update go1.21 and CI #315

Closed helsaawy closed 3 months ago

helsaawy commented 3 months ago

Update go.mod to go1.21 to match hcsshim.

Use atomic.Bool stdlib instead of including our own.

Include tools\mkwinsyscall updates from #283 to switch to syscallN. Note: removed // TODO about print/ln, since the latter adds spaces between args when printing, which is undesired.

Update testing code to fix unchecked-type-assertion lint.

Remove deprecated fields Update CI to:

kevpar commented 3 months ago

This PR feels like it has a several unrelated changes, unless there's some interdepenency between them I'm not aware of. If not, it would be best to do these things as multiple PRs in the future. It's easier to review, and easier if we need to track down a specific change later on.

For now though, I'm okay getting this in (pending the other comment I left).

msscotb commented 3 months ago

Looks ok but please do split unrelated changes in the future.

helsaawy commented 3 months ago

This PR feels like it has a several unrelated changes, unless there's some interdepenency between them I'm not aware of. If not, it would be best to do these things as multiple PRs in the future. It's easier to review, and easier if we need to track down a specific change later on.

For now though, I'm okay getting this in (pending the other comment I left).

The switch to go1.21 caused lint errors for the syscall.N and the race detector/gcc failure (and some weirdness with golangci-lint v1.53, iirc) Upgrading golangci-lint introduced warning about the deprecated .golangci.yml fields and the unchecked-type-assertion linter (added in v1.55, via revive v1.3.4)