Skip to content

OS-specific imports are not correctly guarded by build tags #190

@uhthomas

Description

@uhthomas

Hi,

I'm building a project,which depends on docker, which in turn depends on this repository. The project is built using Bazel and will fail to compile when this repository is present in the source tree.

/private/var/tmp/_bazel_thomas/b6a3c999aae05297a54a9aa13d7a50c3/sandbox/darwin-sandbox/391/execroot/kraken/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go:16:2: imported and not used: "/vendor/golang.org/x/sys/windows" as empty
/private/var/tmp/_bazel_thomas/b6a3c999aae05297a54a9aa13d7a50c3/sandbox/darwin-sandbox/391/execroot/kraken/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go:47:11: undefined: windows
compilepkg: error running subcommand external/go_sdk/pkg/tool/darwin_amd64/compile: exit status 2

This is because there are a few places where imports of golang.org/x/sys/windows, and consequently imports of github.com/Microsoft/go-winio/pkg/guid are not guarded by build tags.

Can the appropriate build tags be added to these files as not to disrupt upstream projects?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions