-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Append path into trimpath if option already exists #2994
Conversation
As a rule of thumb, changes to the rules_go compiler infra that aren't accompanied by a regression test are rarely merged. Changes like this are difficult to understand without the context provided by understanding what the current behavior is and what the authors proposed new behavior is. Would you be willing to put a test together to go with this change so we can better understand the problem and, as an added bonus, prevent regressions in the future? |
I don't mind writing the tests provided that the maintainers are onboard with the change. That was my plan; the template mentions to submit the PR to discuss test strategies, so that's what I did |
Ok I added a test case that shows the issue. The test will fail with This is because the plugin and the host are creating the pb.go file on different build folders which then is included into their binaries. This doesn't work because go plugins are very finicky about dependencies matching exactly and the filepath difference will break it, hence why |
9330f40
to
eb70a28
Compare
eb70a28
to
1c0c559
Compare
@achew22 thoughts? |
This change looks good to me, and the multi-element trimpath commit was included in Go 1.13 which is old enough that we don't need to worry. Merging, thank you! |
The separator in the go code is a semicolon ( |
Also note that later on, we call |
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
Appends paths to
trimpath
as opposed to override potential used-defined flags.Which issues(s) does this PR fix?
User defined
trimpath
throughgc_goopts
are being overriden since a second-trimpath
is being set. This change appends the path using:
which has been supported by go for a while (see https://go-review.googlesource.com/c/go/+/173344/)