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

Allow path + registry dependencies #4844

Merged
merged 1 commit into from
Jan 20, 2018

Conversation

sfackler
Copy link
Member

Closes #4843

Do we have any infrastructure for testing what metadata a publish actually sends to the registry?

r? @withoutboats

@@ -384,7 +384,8 @@ fn select_pkg<'a, T>(mut source: T,
None => None,
};
let vers = vers.as_ref().map(|s| &**s);
let dep = Dependency::parse_no_deprecated(name, vers, source.source_id())?;
let dep = Dependency::parse_no_deprecated(name, vers, source.source_id(),
source.source_id())?;
Copy link
Member Author

Choose a reason for hiding this comment

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

Here and a couple of other places I'm just setting the registry ID to the source ID since it's easier and we won't end up in the publish codepath from here. It's a bit gross though. Maybe it should be optional?

@sfackler
Copy link
Member Author

The test failure seems like a flake?

@alexcrichton
Copy link
Member

Hm could this be possible without specifying an extra field to Dependency? I think it makes sense to store two inside but we could perhaps sideload the information instead of changing the new constructor maybe?

@sfackler
Copy link
Member Author

The other place to put it would be SourceId itself but we'd then have to change its constructor, right?

@alexcrichton
Copy link
Member

Hm sorry so actually thinking again about this.

Is it safe to assume that when you publish a crate then all your path dependencies will be published to the same registry? I think that means we could infer this, right?

@sfackler
Copy link
Member Author

I think it'd be pretty weird to have a "mixed" workspace, but I don't know if I'd want to lock that decision in. It'd be an easy minimal step though.

@sfackler
Copy link
Member Author

If we went that direction I think we would want to enforce that behavior. Not sure how straightforward that would be though.

@alexcrichton
Copy link
Member

Would we actually be locking ourselves in? I'd see it as the more conservative route and then if we liked we could allow simultaneous path/registry keys in the future

@sfackler
Copy link
Member Author

Updated to add a setter for registry_id rather than modifying the constructor.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 20, 2018

📌 Commit 0ec7f68 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jan 20, 2018

⌛ Testing commit 0ec7f68 with merge 7f3196d...

bors added a commit that referenced this pull request Jan 20, 2018
Allow path + registry dependencies

Closes #4843

Do we have any infrastructure for testing what metadata a publish actually sends to the registry?

r? @withoutboats
@bors
Copy link
Contributor

bors commented Jan 20, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 7f3196d to master...

@bors bors merged commit 0ec7f68 into rust-lang:master Jan 20, 2018
@ehuss ehuss added this to the 1.25.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-registries Area: registries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

path and registry shouldn't be mutually exclusive in dependency configurations
5 participants