Move the Rust test debug info setting into [profile.test] - #1581
Merged
Conversation
This reverts commit a68ebeb. Reverted so the setting can be reapplied as `[profile.test]` in the workspace `Cargo.toml`, where it also reaches the `cargo test` invocations the two patched `Makefile` targets missed.
Reapply the CI memory cap as a workspace profile rather than an environment variable on two `Makefile` targets. As a profile it reaches every `cargo test` invocation — the four others in the `Makefile` and direct `cargo test` runs outside it — and it applies to the whole dependency graph, not only the crate under test. Changes: - Add `[profile.test] debug = "line-tables-only"` to the workspace `Cargo.toml` - Add the changelog entry under `## [Unreleased]`
1 task
Collaborator
XCFramework BuildThis PR's XCFramework is available for testing. Add to your .package(url: "https://github.com/automattic/wordpress-rs", branch: "pr-build/1581")Built from d829248 |
oguzkocer
marked this pull request as ready for review
August 20, 2026 00:53
iangmaia
reviewed
Aug 20, 2026
| # This profile covers every crate a `cargo test` run builds, dependencies | ||
| # included — not just the crate under test. | ||
| [profile.test] | ||
| debug = "line-tables-only" |
iangmaia
approved these changes
Aug 20, 2026
Contributor
|
@oguzkocer Thanks for the changelog fix and the config improvement and apologies for rushing the previous PR -- I was too focused on getting the test tasks with the debug info setting and running it on CI. |
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.
Description
#1580 capped Rust test debug info by prefixing two
Makefiletargets withenv CARGO_PROFILE_TEST_DEBUG=line-tables-only. This reverts that commit and reapplies the same setting as[profile.test]in the workspaceCargo.toml.The environment variable reached
test-rust-libandtest-rust-doconly. The four othercargo testinvocations in theMakefile— one of them behindscripts/run-rust-integration-tests.sh— and anycargo testrun outsidemakestill built with full debug info, and every test target added later would have needed the prefix repeated. A profile entry covers all of them and cannot be forgotten. It also keeps local runs and CI on one setting, so alternating betweenmake test-rust-liband thecargo test --libthatCLAUDE.mddocuments no longer rebuilds the dependency graph each way.The profile applies to every crate a
cargo testrun builds, dependencies included, rather than only the crate under test — confirmed withcargo test -p wp_serde_helper --lib --no-run -v, where the dependencies compile with-C debuginfo=line-tables-only.Shipped artifacts are untouched: the Apple libraries build with
--profile $(CARGO_PROFILE)(releaseon CI) under--config profile.$(CARGO_PROFILE).debug=true, and the Android JNI libraries withcargo ndk ... build --releaseunderRUSTFLAGS=-g. Crash-report symbolication is unaffected on both platforms.Changes
env CARGO_PROFILE_TEST_DEBUG=line-tables-onlyprefix fromtest-rust-libandtest-rust-doc, and removing its changelog entry — which had landed inside the released## [0.7.0]section rather than## [Unreleased].[profile.test] debug = "line-tables-only"to the workspaceCargo.toml, commented with the tradeoff (backtraces still resolve to file and line; a debugger can no longer print locals) and theCARGO_PROFILE_TEST_DEBUG=fulloverride for a debugging session.## [Unreleased], filed asChangedto match the other**Internal:**build and CI entries.Changelog
CHANGELOG.mdunder## [Unreleased], using the Keep a Changelog categories (Added,Changed,Deprecated,Removed,Fixed,Security). Prefix breaking changes with**BREAKING:**.