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

cmd/go: add 'unix' build tag but not *_unix.go file support #51572

Closed
rsc opened this issue Mar 9, 2022 · 10 comments
Closed

cmd/go: add 'unix' build tag but not *_unix.go file support #51572

rsc opened this issue Mar 9, 2022 · 10 comments

Comments

@rsc
Copy link
Contributor

rsc commented Mar 9, 2022

In #20322 we accepted a proposal to recognize unix both as a file suffix and a build tag.
@ianlancetaylor implemented it but found that there were many collisions with files named *_unix.go that would break builds.

It sounds like we should revisit this and add just the build tag, leaving unix unrecognized in file names.
This would match what we already do with tags like gc, gccgo, cgo, and so on.

So that's the proposal: add unix only as a build tag.

See #20322 (comment) and the following comments for more details.
(Opened a new issue so people don't have to read the entire conversation from before.)

@rsc
Copy link
Contributor Author

rsc commented Mar 9, 2022

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@ianlancetaylor
Copy link
Contributor

CC @robpike

@gopherbot
Copy link

Change https://go.dev/cl/389935 mentions this issue: all: use new "unix" build tag where appropriate

@gopherbot
Copy link

Change https://go.dev/cl/389934 mentions this issue: go/build: recognize "unix" build tag

@rsc rsc moved this from Active to Likely Accept in Proposals (old) Mar 16, 2022
@rsc
Copy link
Contributor Author

rsc commented Mar 16, 2022

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

@rsc rsc moved this from Likely Accept to Accepted in Proposals (old) Mar 23, 2022
@rsc
Copy link
Contributor Author

rsc commented Mar 23, 2022

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

@rsc rsc changed the title proposal: cmd/go: add 'unix' build tag but not *_unix.go file support cmd/go: add 'unix' build tag but not *_unix.go file support Mar 23, 2022
@rsc rsc modified the milestones: Proposal, Backlog Mar 23, 2022
@dmitshur dmitshur modified the milestones: Backlog, Go1.19 Mar 28, 2022
@gopherbot
Copy link

Change https://go.dev/cl/396295 mentions this issue: doc/go1.19: mention new unix build constraint

gopherbot pushed a commit that referenced this issue Mar 29, 2022
For #51572

Change-Id: Ib27be79379c8b3f72e29365b58067d7ee1919e52
Reviewed-on: https://go-review.googlesource.com/c/go/+/396295
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
gopherbot pushed a commit that referenced this issue Mar 29, 2022
For #20322
For #51572

Change-Id: Id0b4799d097d01128e98ba4cc0092298357bca45
Reviewed-on: https://go-review.googlesource.com/c/go/+/389935
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
@gopherbot
Copy link

Change https://go.dev/cl/426296 mentions this issue: cmd/go/internal/imports: recognize "unix" build tag

gopherbot pushed a commit that referenced this issue Aug 30, 2022
For #20322
For #51572
Fixes #54712

Change-Id: I22fcfa820e83323bfdf1a40deee7286240f02b3e
GitHub-Last-Rev: cd2c653
GitHub-Pull-Request: #54716
Reviewed-on: https://go-review.googlesource.com/c/go/+/426296
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
@gopherbot
Copy link

Change https://go.dev/cl/426814 mentions this issue: [release-branch.go1.19] cmd/go/internal/imports: recognize "unix" build tag

gopherbot pushed a commit that referenced this issue Aug 30, 2022
…ld tag

For #20322
For #51572
Updates #54712
Fixes #54736

Change-Id: I22fcfa820e83323bfdf1a40deee7286240f02b3e
GitHub-Last-Rev: cd2c653
GitHub-Pull-Request: #54716
Reviewed-on: https://go-review.googlesource.com/c/go/+/426296
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
(cherry picked from commit 3c6a5cd)
Reviewed-on: https://go-review.googlesource.com/c/go/+/426814
Run-TryBot: Bryan Mills <bcmills@google.com>
bradfitz pushed a commit to tailscale/go that referenced this issue Sep 8, 2022
…ld tag

For golang#20322
For golang#51572
Updates golang#54712
Fixes golang#54736

Change-Id: I22fcfa820e83323bfdf1a40deee7286240f02b3e
GitHub-Last-Rev: cd2c653
GitHub-Pull-Request: golang#54716
Reviewed-on: https://go-review.googlesource.com/c/go/+/426296
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
(cherry picked from commit 3c6a5cd)
Reviewed-on: https://go-review.googlesource.com/c/go/+/426814
Run-TryBot: Bryan Mills <bcmills@google.com>
@gopherbot
Copy link

Change https://go.dev/cl/437235 mentions this issue: all: use "unix" build tag where appropriate

gopherbot pushed a commit that referenced this issue Sep 30, 2022
Convert a few occurrences that were submitted after CL 389935.

For #20322
For #51572

Change-Id: I0047361916c402f8e37f515e6b09d451bd499e6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/437235
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
@golang golang locked and limited conversation to collaborators Sep 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

4 participants