Skip to content

refactor(confg): Create a config abstraction - #17606

Merged
epage merged 15 commits into
rust-lang:masterfrom
epage:config
Oct 19, 2026
Merged

epage merged 15 commits into
rust-lang:masterfrom
epage:config

Conversation

@epage

@epage epage commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

This is part of #12883

This creates what I'm hoping will be the core API of the new crate and pulls out some fundamental APIs that clean up the current code.
This stopped short of pulling everything in like

  • deserialization from CVs to structs which requires figuring out a design for environment variables and knowing some unstable features
  • loading of config which pulls in a lot more logic like home dir, etc.

This felt like a clean line for a "this improves things independent of #12883" before tipping into "this exists solely for #12883".
Follow up PRs will deal with the latter.

How to test and review this PR?


🤖 LLM disclosure: helped with renames, logic moves, logic extraction, etc

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. A-configuration Area: cargo config files and env vars Command-vendor S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 18, 2026
@rustbot

rustbot commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

r? @Muscraft

rustbot has assigned @Muscraft.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Muscraft, @epage, @weihanglo
  • @Muscraft, @epage, @weihanglo expanded to Muscraft, epage, weihanglo
  • Random selection from Muscraft, weihanglo

@weihanglo weihanglo left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. The cleanup looks reasonable. Just one nit and feel free to merge with or without addressing that.

View changes since this review

Comment thread src/context/config.rs
@rustbot

rustbot commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@epage
epage enabled auto-merge October 19, 2026 15:57
@epage
epage added this pull request to the merge queue Oct 19, 2026
Merged via the queue into rust-lang:master with commit 09725a5 Oct 19, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 19, 2026
@epage
epage deleted the config branch October 19, 2026 17:16
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Oct 21, 2026
Update cargo submodule

12 commits in 3960fa69bb617e3d93c4ddc087c1b32bf12ad907..15be64aa0859b5c36f7a86d52f7aa0db44ba4d84
2026-10-12 19:29:05 +0000 to 2026-10-20 16:03:21 +0000
- feat(prerelease): support `[patch]` with `-Zprerelease` (rust-lang/cargo#17613)
- chore(gh): Overhaul PR template (rust-lang/cargo#17612)
- fix(util-schemas): compile out the file-path hint where url can't build it (rust-lang/cargo#17600)
- feat(build-std): Add build.build-std.when and crates config keys (rust-lang/cargo#17602)
- refactor(confg): Create a config abstraction (rust-lang/cargo#17606)
- fix(config): Apply dotted tuple support for rustflags (rust-lang/cargo#17594)
- Feat: Shell completion show all the packages having the feature (rust-lang/cargo#17574)
- fix(config): Don't load registry config from credentials.toml (rust-lang/cargo#17599)
- fix(fingerprint): choose a stable path when source mtimes tie (rust-lang/cargo#17521)
- Update gix crates to address CVE-2026-82248, CVE-2026-82249, and CVE-2026-82250, and update git utils.rs to accommodate gix-url v0.38.0. (rust-lang/cargo#17484)
- fix: check crate type when pruning `-L` paths (rust-lang/cargo#17589)
- refactor(parser): Simplify dep source validation (rust-lang/cargo#17506)

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area: Command-line interface, option parsing, etc. A-configuration Area: cargo config files and env vars Command-vendor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants