Repository navigation
build(profile): keep line tables for the workspace and no debug info for dependencies - #77
Open
justin13888 wants to merge 1 commit into
Open
justin13888 wants to merge 1 commit into
justin13888 wants to merge 1 commit into
Conversation
…for dependencies A new `[profile.dev]` sets `debug = "line-tables-only"`, and `[profile.dev.package."*"]` sets `debug = false`. `[profile.test]` drops from `debug = 1` to `"line-tables-only"` and keeps `opt-level = 3` and `incremental`. Its dependencies inherit the dev `"*"` override, which `cargo test --no-run -v` confirms, so no test-specific package block is needed. Workspace backtraces keep file:line. Dependency frames keep their symbol names but lose file:line. `CARGO_PROFILE_DEV_DEBUG=2` and `--config 'profile.dev.package."*".debug=2'` restore full debug info for one build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cargo.tomladds[profile.dev] debug = "line-tables-only"and[profile.dev.package."*"] debug = false, with a comment giving the reason and the override.Cargo.toml[profile.test]:debug = 1becomes"line-tables-only".opt-level = 3andincremental = trueare unchanged, because some suites are dominated by run time. A short comment records this. No[profile.test.package."*"]block is needed, becausetestinherits the dev"*"override (verified below).release,fast-debug,bench.Why: this keeps full debug info from piling up in
target/under fast iteration. Workspace backtraces keep file:line. Dependency frames keep their symbol names but lose file:line. To restore full debug info for one build:CARGO_PROFILE_DEV_DEBUG=2/CARGO_PROFILE_TEST_DEBUG=2(workspace) andcargo --config 'profile.dev.package."*".debug=2' ...(dependencies). No size measurements were taken.Validation
cargo metadata --no-deps --format-version 1— parses.cargo fmt --all -- --check— pass.cargo check --workspace— pass.cargo build -v -p rawshift-core(dev).rawshift_coregets-C debuginfo=line-tables-only. Dependenciesgamut_core,gamut_color,thiserror,synand the rest get no-C debuginfoflag (= 0).cargo test --no-run -v -p rawshift-core --lib(test).rawshift_core --testgets-C debuginfo=line-tables-only -C opt-level=3.gamut_core,gamut_color,serde_json,memchr,thiserrorand the rest get-C opt-level=3with no-C debuginfo. This confirms thattestinheritsdev.package."*".just clippy,cargo test --workspace(the lefthook pre-commit/pre-push rows; lefthook is not installed in this checkout). Deferred to CI.Risks and rollout
jpegxl-srcthrough cmake-rs (viagamut-jxl-sys), which picks its CMake build type from cargo'sOPT_LEVEL/DEBUG. Undertest(opt-level 3) it moves fromRelWithDebInfotoRelease, so the firstcargo testafter this rebuilds libjxl. Underdev(opt-level 0) it staysDebug, and so keeps its own-g. That build type was reasoned from cmake-rs's source, not observed in a build log here.