Skip to content

Reject publishing of crates that depend on an alternative registry #1589

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

Merged
merged 1 commit into from
Jan 21, 2019

Conversation

jtgeibel
Copy link
Member

@jtgeibel jtgeibel commented Jan 8, 2019

@@ -80,6 +80,12 @@ pub fn add_dependencies(
let git_and_new_dependencies = deps
.iter()
.map(|dep| {
if let Some(registry) = &dep.registry {
if !registry.is_empty() {
return Err(human(&format_args!("Dependency `{}` is from an alternative registry. Depending on alternative registries is not allowed on crates.io.", &*dep.name)));
Copy link
Contributor

@sgrif sgrif Jan 9, 2019

Choose a reason for hiding this comment

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

What do you think about this wording instead?

Dependency `{}` is hosted on another registry. Cross-registry dependencies are not permitted on crates.io

@jtgeibel jtgeibel force-pushed the deny-alt-registry-deps branch from 2360837 to 0b606ae Compare January 15, 2019 04:17
@sgrif
Copy link
Contributor

sgrif commented Jan 16, 2019

LGTM once the test failure is fixed

@jtgeibel jtgeibel force-pushed the deny-alt-registry-deps branch from 0b606ae to 4df95a2 Compare January 21, 2019 03:19
@jtgeibel
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Jan 21, 2019

📌 Commit 4df95a2 has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented Jan 21, 2019

⌛ Testing commit 4df95a2 with merge 437657d...

bors added a commit that referenced this pull request Jan 21, 2019
Reject publishing of crates that depend on an alternative registry

See also #1579 and rust-lang/crates-io-cargo-teams#21.
@bors
Copy link
Contributor

bors commented Jan 21, 2019

☀️ Test successful - checks-travis
Approved by: jtgeibel
Pushing 437657d to master...

@bors bors merged commit 4df95a2 into rust-lang:master Jan 21, 2019
@jtgeibel jtgeibel deleted the deny-alt-registry-deps branch January 23, 2019 23:55
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.

3 participants