Skip to content

Fix linting, remove solaris code, and exclude files on Windows#39

Merged
estesp merged 4 commits intocontainerd:masterfrom
thaJeztah:remove_solaris_fix_windows
Mar 30, 2021
Merged

Fix linting, remove solaris code, and exclude files on Windows#39
estesp merged 4 commits intocontainerd:masterfrom
thaJeztah:remove_solaris_fix_windows

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Mar 25, 2021

This reverts 14d8313 (#36), as there were many other paths that failed to compile on Windows, so it was a wasted effort.

Also;

  • removes the solaris code, which caused additional failures and is unmaintained/unused
  • excludes all files on windows
  • fixes some gofmt and linting failures on the non-linux files

Unfortunately, linting still fails on windows; see #38 (comment) for unknown reasons, so I think I'll call it a day (no windows code should import this)

This reverts commit 14d8313.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
This caused builds on Windows to fail, and no work is done on Solaris builds,
so we might as wel remove this code

    typechecking error: D:\\a\\fifo\\fifo\\src\\github.com\\containerd\\fifo\\mkfifo_nosolaris.go:24:17: Mkfifo not declared by package syscall

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Previous attempts to exclude more granular failed, so excluding most/all files on windows

    typechecking error: D:\\a\\fifo\\fifo\\src\\github.com\\containerd\\fifo\\handle_nolinux.go:34:19: Stat_t not declared by package syscall
    typechecking error: D:\\a\\fifo\\fifo\\src\\github.com\\containerd\\fifo\\handle_nolinux.go:35:20: Stat not declared by package syscall
    typechecking error: D:\\a\\fifo\\fifo\\src\\github.com\\containerd\\fifo\\raw_test.go:220:27: cannot use int(fd) (value of type int) as syscall.Handle value in argument to syscall.Write
    typechecking error: D:\\a\\fifo\\fifo\\src\\github.com\\containerd\\fifo\\raw_test.go:240:26: cannot use int(fd) (value of type int) as syscall.Handle value in argument to syscall.Read

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah changed the title Remove solaris fix windows Fix linting, remove solaris code, and exclude files on Windows Mar 25, 2021
@thaJeztah thaJeztah force-pushed the remove_solaris_fix_windows branch from c1bbb73 to d7380cc Compare March 25, 2021 21:48
@thaJeztah
Copy link
Copy Markdown
Member Author

Tested these changes in containerd/containerd#5269 to verify all is working

@thaJeztah thaJeztah marked this pull request as ready for review March 25, 2021 21:49
@thaJeztah thaJeztah requested review from AkihiroSuda and cpuguy83 and removed request for AkihiroSuda March 25, 2021 21:50
@thaJeztah
Copy link
Copy Markdown
Member Author

#38 is now green with these changes; thanks to @mxpv for pointing me to the "newlines" issue on Windows linters

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@estesp estesp merged commit a77444a into containerd:master Mar 30, 2021
@thaJeztah thaJeztah deleted the remove_solaris_fix_windows branch March 30, 2021 13:53
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.

4 participants