-
Notifications
You must be signed in to change notification settings - Fork 6
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
Translate paths in compilepkg output. #5
Conversation
4ba7ff8
to
fb8027f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine but I'm interested in why tweaking the -trimpath
argument in the compiler invocation is not what we're doing, primarily because that would be less code. Does that not work for some reason?
As far as I can tell from my testing, trimpath has nothing to do with
_compilation_ error messages, only with _runtime_ error messages.
cockroachdb/cockroach#76377 (comment)
You can tell because if trimpath affected compilation error messages, it
would _already_ look like the third code block. It doesn't, though, it
looks like the second one.
…On Thu, Apr 7, 2022 at 5:04 PM Ricky Stewart ***@***.***> wrote:
***@***.**** approved this pull request.
This looks fine but I'm interested in why tweaking the -trimpath argument
in the compiler invocation is not what we're doing, primarily because that
would be less code. Does that not work for some reason?
—
Reply to this email directly, view it on GitHub
<#5 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMCHUKSXJNLCV35VOCNT5TVD5EWDANCNFSM5SQ3MRRA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
*Mari* *Lyndon* *(**MAH-ree **LIN-dun) *🏳️⚧️ 🚺 *she/her*
👷🏻♀️ 🧰 Engineering Productivity
👩🏻💻 🪳 Software Engineer @ Cockroach Labs
🏡 🇺🇸 Richmond, VA (Eastern Time)
|
When cgo2 is involved in a build, the go srcs are linked/copied into a temporary directory to keep everything in the same directory. Those paths are unrecognizable to IDEs, being absolute paths outside the project directory. This adds a translation step to replace paths in the compiler output, translating them back to the input paths that were given to the tool in the first place. This doesn't affect -trimpath, which affects runtime error messages but not compilation-time error messages; for the same reason, this change can't use that flag to do its dirty work. Fixes cockroachdb/cockroach#76377. Release note: None
fb8027f
to
2a778e9
Compare
Okay, updated comments (pull request, commit, and the one from the issue itself). Merging now! |
The rules_go version has been bumped to accept the new changes from cockroachdb/rules_go#5. Release note: None
79245: ci: build and publish cockroach-sql r=rickystewart a=rail This patch adds `cockroach-sql` as a separate artifact published to S3. The binary is not stripped (TBD). Fixes #75800 Release note: None 79651: test: fix bazel sqllite invocation r=cucaroach a=cucaroach Release note: None 79661: WORKSPACE: update rules_go version r=mari-crl a=mari-crl The rules_go version has been bumped to accept the new changes from cockroachdb/rules_go#5. Finishing blow for #76377. Release note: None Co-authored-by: Rail Aliiev <[email protected]> Co-authored-by: Tommy Reilly <[email protected]> Co-authored-by: Mari Staib <[email protected]>
When cgo2 is involved in a build, the go srcs are linked/copied
into a temporary directory to keep everything in the same
directory. Those paths are unrecognizable to IDEs, being absolute
paths outside the project directory.
This adds a translation step to replace paths in the compiler output,
translating them back to the input paths that were given to the tool
in the first place.
This doesn't affect -trimpath, which affects runtime error messages
but not compilation-time error messages; for the same reason, this
change can't use that flag to do its dirty work.
Fixes cockroachdb/cockroach#76377.
Release note: None