-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
gcassert: fix issues when running under bazel #103471
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
bb3cbba
to
dcfd840
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.
What the hell is going on with the update to dev
??
just testing 😄 |
ea9eeaf
to
e23960d
Compare
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
fbf3d98
to
bb27891
Compare
3f6f9ae
to
581517b
Compare
This is ready for review. Generated code and GitHub CI failures should be fixed when I merge jordanlewis/gcassert#12 and point to it instead of my fork. |
beade4d
to
78a1348
Compare
f8052df
to
03b8ee6
Compare
@@ -2,8 +2,14 @@ | |||
|
|||
set -xeuo pipefail | |||
|
|||
# GCAssert requirements -- start | |||
PATH="$(dirname $(bazel run @go_sdk//:bin/go --run_under=realpath)):$PATH" |
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.
export PATH=
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.
Done
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.
Commit message and PR description are no longer accurate
go.mod
Outdated
@@ -159,7 +159,7 @@ require ( | |||
github.com/jackc/pgx/v5 v5.3.1 | |||
github.com/jaegertracing/jaeger v1.18.1 | |||
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible | |||
github.com/jordanlewis/gcassert v0.0.0-20221027203946-81f097ad35a0 | |||
github.com/jordanlewis/gcassert v0.0.0-20230607150025-9012d8e73bdd |
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.
We don't need to/shouldn't be updating gcassert
any more, right? The bazel
patches that were applied are all faulty and we don't seem to be using them anyway.
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.
We still need to update gcassert to pull changes where we get the logs and can run in debug mode. In the current version we do not capture build logs.
pkg/cmd/generate-cgo/main.go
Outdated
cppFlags := fmt.Sprintf("-I%s", filepath.Join(jemallocDir, "include")) | ||
ldFlags := fmt.Sprintf("-L%s -L%s", filepath.Join(jemallocDir, "lib"), filepath.Join(projDir, "lib")) | ||
|
||
tempToPersistentDirs := make(map[string]string, 3) |
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.
Nit: srcToPersistentDirs
seems more appopriate as a name since these files don't come from "temporary" directories.
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.
Done
c2b9f08
to
ab125ed
Compare
Updated |
ensuring that we generate go and cgo files, and pass a path to C and C++ compilers to the lint test process. With these changes, `gcassert` can run as part of the `Lint` build config and doesn't need its own build config so the gcassert build config scripts are deleted. Release note: None Epic: CRDB-8349 Closes cockroachdb#65485
ab125ed
to
b8311b7
Compare
TFTR! bors r=rickystewart |
Build succeeded: |
Nice work figuring this out! |
This code change fixes issues when running gcassert under bazel by ensuring that we generate go and cgo files, and pass a path to C and C++ compilers to the lint test process.
With these changes,
gcassert
can run as part of theLint
build config and doesn't need its own build config so the gcassert build config scripts are deleted.Release note: None
Epic: CRDB-8349
Closes #65485