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: working directory affects binaries even with -trimpath [1.13 backport] #34326

Closed
gopherbot opened this issue Sep 16, 2019 · 3 comments

Comments

@gopherbot
Copy link

commented Sep 16, 2019

@FiloSottile requested issue #33772 to be considered for backport to the next 1.13 minor release.

I'd like this to be considered for backport to Go 1.13 (@gopherbot, please do the honors).

There is no real workaround to get the functionality of -trimpath without this fix, which AFAICT was added specifically for reproducible builds.

@toothrot

This comment has been minimized.

Copy link
Contributor

commented Oct 1, 2019

Approving. This was documented as a feature in 1.13, and does not work without this fix.

@gopherbot

This comment has been minimized.

Copy link
Author

commented Oct 1, 2019

Change https://golang.org/cl/198259 mentions this issue: [release-branch.go1.13] cmd/go: don't include package dir in cache key when -trimpath is set

@gopherbot

This comment has been minimized.

Copy link
Author

commented Oct 1, 2019

Closed by merging 8c8a881 to release-branch.go1.13.

@gopherbot gopherbot closed this Oct 1, 2019
gopherbot pushed a commit that referenced this issue Oct 1, 2019
…y when -trimpath is set

The '-trimpath' flag tells 'go build' to trim any paths from the
output files that are tied to the current workspace or toolchain. When
this flag is set, we do not need to include the package directory in
the text hashed to construct the action ID for each package.

Updates #33772
Fixes #34326

Change-Id: I20b902d2f58019709b15864ca79aa0d9255ae707
Reviewed-on: https://go-review.googlesource.com/c/go/+/195318
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
(cherry picked from commit aa680c0)
Reviewed-on: https://go-review.googlesource.com/c/go/+/198259
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.