-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Manifest::dependencies()
always have crates.io SourceIds even if manifest does not
#13369
Comments
Manifest::dependencies()
always have crates.io SourceIds even if manifest does not
So not touched this part too much but I believe source replacement is a feature within the resolver, rather than being a part of loading the manifest. |
Sure, that's why I hand-wrote the loading part. But the |
IIUC, the actual (In cargo/src/cargo/core/registry.rs Lines 638 to 639 in 3e1a2dd
|
Though kinda inconsistent? For the To be consistent, either the |
Something to keep in mind is that the primary target of cargo-the-lib is cargo-the-bin. It isn't specifically designed as a general use library and you will likely run into impedance mismatches with how you are wanting to use it, like that. Generally, we recommend people using |
I don't have an answer for this. Letting |
Thanks for the advice on cargo_metadata and friends, will explore using them. When opening this issue, my thoughts were more on a correctness (and consistency?) perspective. Though with the primary target of "the lib" being "the bin", it's probably not worth it to dig further down.
Unfamiliar with the internals, my assumption that
It's more like a nuance - I use source replacement, a tool I use didn't respect that, I wrote some code for that then found out a side use case still doesn't, and tracing that down led to this issue. Making The tool is debcargo, used to package Rust crates in Debian. Its primary use case, packaging, involves downloading the target crate into registry cache, extracting its It seems possible to work around this problem with a few lines to manually set "correct" |
Problem
A minimal example:
Then, with source replacement in place:
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: