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

bazel,dev: clarify using -c dbg for debuggable executables, ensure support in dev #106820

Closed
rickystewart opened this issue Jul 14, 2023 · 0 comments · Fixed by #106944
Closed
Labels
A-build-system C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-dev-inf

Comments

@rickystewart
Copy link
Collaborator

rickystewart commented Jul 14, 2023

Since a recent rules_go upgrade (which one?), the way to build a Go executable with debugging information is to use -c dbg. Clarify this in documentation, consider sending a notice to engineers at cockroach to reflect the change, and ensure dev has support for building these executables and staging them from the correct location.

Jira issue: CRDB-29729

@rickystewart rickystewart added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-build-system T-dev-inf labels Jul 14, 2023
rickystewart added a commit to rickystewart/cockroach that referenced this issue Jul 17, 2023
... and switch our default compilation mode to `dbg`.

Under `fastbuild`, built binaries are stripped. This is not the case
with `dbg`. Have `dev doctor` recommend using `dbg`, and either way
make `dev` resilient to whatever kind of `--compilation_mode` you're
using.

In principle or theory `dbg` is slower than `fastbuild`, but for the Go
compiler it generates debuggable binaries by default and you have to
opt-in to stripping, so it shoould make no real difference.

Now, we think of the `--compilation_mode` simply as follows: `dbg` is
the default that everyone is opted into by default unless they
explicitly set `-c opt` (we use this for release). For now I don't see
a reason anyone would need `fastbuild`.

Epic: CRDB-17171
Release note: None
Closes: cockroachdb#106820
craig bot pushed a commit that referenced this issue Jul 18, 2023
105582: opt: check that generator functions are not used in CASE or COALESCE r=DrewKimball a=DrewKimball

#### opt: check that generator functions are not used in CASE or COALESCE

This patch adds checks during type-checking to ensure that generator functions
are not used in the arguments of `CASE`, `IF`, `COALESCE`, or `IFNULL`
expressions. This mirrors postgres behavior. This patch also corrects the error
message that is returned in these cases to say "set-returning" instead of
"generator".

Fixes #97119
Fixes #94890

Release note (bug fix): CASE, IF, COALESCE, and IFNULL expressions now return
an error when passed a generator function as an argument. This mirrors postgres
behavior.

106944: bazel,dev: in `dev`, handle different `--compilation_mode`s correctly... r=rail a=rickystewart

... and switch our default compilation mode to `dbg`.

Under `fastbuild`, built binaries are stripped. This is not the case with `dbg`. Have `dev doctor` recommend using `dbg`, and either way make `dev` resilient to whatever kind of `--compilation_mode` you're using.

In principle or theory `dbg` is slower than `fastbuild`, but for the Go compiler it generates debuggable binaries by default and you have to opt-in to stripping, so it shoould make no real difference.

Now, we think of the `--compilation_mode` simply as follows: `dbg` is the default that everyone is opted into by default unless they explicitly set `-c opt` (we use this for release). For now I don't see a reason anyone would need `fastbuild`.

Epic: CRDB-17171
Release note: None
Closes: #106820

107086: server: minor improvement around TestTenantInterface r=yuzefovich a=yuzefovich

Addresses: #76378.
Fixes: #106903.


Co-authored-by: Drew Kimball <drewk@cockroachlabs.com>
Co-authored-by: Ricky Stewart <ricky@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
@craig craig bot closed this as completed in 60e8bce Jul 18, 2023
rickystewart added a commit to rickystewart/cockroach that referenced this issue Sep 16, 2024
... and switch our default compilation mode to `dbg`.

Under `fastbuild`, built binaries are stripped. This is not the case
with `dbg`. Have `dev doctor` recommend using `dbg`, and either way
make `dev` resilient to whatever kind of `--compilation_mode` you're
using.

In principle or theory `dbg` is slower than `fastbuild`, but for the Go
compiler it generates debuggable binaries by default and you have to
opt-in to stripping, so it shoould make no real difference.

Now, we think of the `--compilation_mode` simply as follows: `dbg` is
the default that everyone is opted into by default unless they
explicitly set `-c opt` (we use this for release). For now I don't see
a reason anyone would need `fastbuild`.

Epic: CRDB-17171
Release note: None
Closes: cockroachdb#106820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-system C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-dev-inf
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant