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

Filter cargo-credential-* dependencies by OS #12949

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Nov 9, 2023

What does this PR try to resolve?

The cargo-credential-* crates have OS-specific functionality, with cfg for an "unsupported" fallback, and these are unconditional dependencies of cargo. In distros like Fedora that package dependencies individually, that means these crates still have to be packaged even when they are useless on Linux. (Or else patch them out as a downstream change.) Instead, we can filter those dependencies in Cargo.toml and add the fallback at the point of use.

Fixes #12945.

Additional information

We could further remove the cfg-unsupported fallbacks from the individual crates, and just have them #![cfg(..)] themselves globally. I haven't done that yet, because it would look like a big change for mostly just whitespace removing the nested module. I'm happy to add that if desired though.

@rustbot
Copy link
Collaborator

rustbot commented Nov 9, 2023

r? @epage

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-registry-authentication Area: registry authentication and authorization (authn authz) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 9, 2023
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

I am good with this change. Thank you!

@weihanglo
Copy link
Member

We could further remove the cfg-unsupported fallbacks from the individual crates,

This was a workaround to make cargo buildable on every supported platform, as well as those crates themselves, before any progress made in #6179.

@arlosi
Copy link
Contributor

arlosi commented Nov 9, 2023

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Nov 9, 2023

📌 Commit 1ee9632 has been approved by arlosi

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 9, 2023
@bors
Copy link
Contributor

bors commented Nov 9, 2023

⌛ Testing commit 1ee9632 with merge 9b2cad6...

@bors
Copy link
Contributor

bors commented Nov 9, 2023

☀️ Test successful - checks-actions
Approved by: arlosi
Pushing 9b2cad6 to master...

@bors bors merged commit 9b2cad6 into rust-lang:master Nov 9, 2023
22 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 10, 2023
Update cargo

12 commits in 7046d992f9f32ba209a8079f662ebccf9da8de25..6790a5127895debec95c24aefaeb18e059270df3
2023-11-08 03:24:57 +0000 to 2023-11-10 17:09:35 +0000
- refactor(source): Prepare for new PackageIDSpec syntax (rust-lang/cargo#12938)
- credential: include license files in all published crates (rust-lang/cargo#12953)
- fix: preserve jobserver file descriptors on rustc invocation in `fix_exec_rustc` (rust-lang/cargo#12951)
- refactor(resolver): Consolidate logic in `VersionPreferences` (rust-lang/cargo#12930)
- refactor(toml): Simplify code to make schema split easier (rust-lang/cargo#12948)
- Filter `cargo-credential-*` dependencies by OS (rust-lang/cargo#12949)
- refactor(util): Pull out `mod util_semver` (rust-lang/cargo#12940)
- Fix the invalidate feature name message (rust-lang/cargo#12939)
- refactor(util): Prepare for splitting out semver logic (rust-lang/cargo#12926)
- feat: Make browser links out of HTML file paths (rust-lang/cargo#12889)
- Do not allow empty feature name (rust-lang/cargo#12928)
- fix(timings): unnecessary backslash when error happens (rust-lang/cargo#12934)

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 11, 2023
Update cargo

12 commits in 7046d992f9f32ba209a8079f662ebccf9da8de25..6790a5127895debec95c24aefaeb18e059270df3
2023-11-08 03:24:57 +0000 to 2023-11-10 17:09:35 +0000
- refactor(source): Prepare for new PackageIDSpec syntax (rust-lang/cargo#12938)
- credential: include license files in all published crates (rust-lang/cargo#12953)
- fix: preserve jobserver file descriptors on rustc invocation in `fix_exec_rustc` (rust-lang/cargo#12951)
- refactor(resolver): Consolidate logic in `VersionPreferences` (rust-lang/cargo#12930)
- refactor(toml): Simplify code to make schema split easier (rust-lang/cargo#12948)
- Filter `cargo-credential-*` dependencies by OS (rust-lang/cargo#12949)
- refactor(util): Pull out `mod util_semver` (rust-lang/cargo#12940)
- Fix the invalidate feature name message (rust-lang/cargo#12939)
- refactor(util): Prepare for splitting out semver logic (rust-lang/cargo#12926)
- feat: Make browser links out of HTML file paths (rust-lang/cargo#12889)
- Do not allow empty feature name (rust-lang/cargo#12928)
- fix(timings): unnecessary backslash when error happens (rust-lang/cargo#12934)

r? ghost
@ehuss ehuss added this to the 1.75.0 milestone Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-registry-authentication Area: registry authentication and authorization (authn authz) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

non-target-specific / unconditional dependencies on potentially unusable credential providers
7 participants