Skip to content

fix(rust): treat quoted keys and inline tables in Cargo config as build settings - #229

Merged
adityankale190895 merged 3 commits into
DiffCI:mainfrom
FredApps:rust/cargo-config-inline-tables
Nov 18, 2026
Merged

adityankale190895 merged 3 commits into
DiffCI:mainfrom
FredApps:rust/cargo-config-inline-tables

Conversation

@FredApps

Copy link
Copy Markdown
Contributor

Fixes #221

changesBuild now treats these as build-changing too, because Cargo applies them all:

  • quoted keys ("build".rustflags, 'rustflags' = …, ["target".x86_64-…]). Simple quoted keys are unquoted before matching.
  • top-level build, patch and unstable inline tables (build = { rustflags = […] }).

The config test now checks six such spellings, and checks that "net".retry and an inline term table still don't block.

Trade-off: build = { jobs = 4 } now falls back too. That fails closed and I'd expect it to be rare. A real TOML parser would remove the guesswork, but Core has no TOML dependency, and I didn't want to add one for this.

Validation (Linux, Node 22, Cargo 1.100): npm run typecheck and the Rust test files (tests/repo/rust-*.test.ts, tests/planner/rust-command.test.ts) pass. The new test fails on main and passes here.

@FredApps
FredApps marked this pull request as ready for review November 17, 2026 17:18
I, FredApps <[email protected]>, hereby add my Signed-off-by to this commit: 886653d

Signed-off-by: FredApps <[email protected]>
@adityankale190895
adityankale190895 merged commit 4f3e4df into DiffCI:main Nov 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust adapter: quoted keys and inline tables in .cargo/config bypass the build-config check

2 participants