[go: up one dir, main page]

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

Ability to build package locally using version instead of path. #8447

Open
wdanilo opened this issue Jul 3, 2020 · 2 comments
Open

Ability to build package locally using version instead of path. #8447

wdanilo opened this issue Jul 3, 2020 · 2 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@wdanilo
Copy link
wdanilo commented Jul 3, 2020

The problem
Hi! I have a lot of crates in my workspace (40+). Let's consider 2 of them - A and B. The A's Cargo.toml specifies dep:

b = {version = "0.0.1", path = "../b"}

It's cool, works and allows for local changes and testing the package. The problem is, however, that I cannot set up CI to test if I have updated all things on crates.io. I want my CI to build the workspace but instead of using path I want it to download things from crates. I believe this functionality is already implemented because this is how cargo works when installing crates from crates.io, but it seems that there is no way to locally enable it.

@wdanilo wdanilo added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jul 3, 2020
@alexcrichton
Copy link
Member

#8415 may be of interest to you perhaps?

@ehuss
Copy link
Contributor
ehuss commented Jul 29, 2020

Can you clarify how you would like it to behave? You can test if it builds today as-if it is version only with cargo package (this creates a temporary copy of the package with all path entries removed). However, I would assume if you are using path dependencies, this would end up testing with older versions which may not be what you intend? For example, if you have:

b = {version = "0.1", path = "../b"}

And the version on crates.io is 0.1.0, but the local path dependency is an unpublished 0.1.1, then it would test the wrong version (and presumably if you are relying on new APIs, wouldn't compile at all).

I guess I'm having a hard time seeing when this would be useful, since in most cases the path deps point to unpublished versions.

@epage epage added the S-triage Status: This issue is waiting on initial triage. label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

4 participants