-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support relative paths for registries #2252
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Comments
marcbowes
added a commit
to marcbowes/cargo
that referenced
this issue
Jan 25, 2016
This commit adds a `ToUrlWithBase` trait which is used when parsing the value of `registry.index` from a Cargo config file. The base url is the file that contained the URL. The net effect is that you can now use relative URLs when specifying a registry.
ghost
mentioned this issue
Jan 21, 2019
I apologize if I cause annoyance, I know this is an old issue. I think it might be good if I add one similar example about using dependencies too. Currently Rust 1.32.0 doesn't work with local Git relative paths, like this: [dependencies]
some-lib = { git='file:../../some-lib/', tag='...' } So it would be great if you also consider that use case. Thank you, |
alexcrichton
added
the
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
label
Jan 22, 2019
I'm taking a look at this issue. |
bors
added a commit
that referenced
this issue
Apr 29, 2019
Support relative paths for registries Closes #2252 I haven't finished the tests for this yet as I wasn't sure what was necessary. Is it OK to just test through `registry_configuration()` in `src/cargo/ops/registry.rs` or are integration tests required? If integration tests then I'm not sure what cargo sub-command I can run without a real remote registry to play with; any thoughts?
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`
I have a use case where I need a local registry. I currently do this by editing
.cargo/config
and specifying the absolute path to the registry:Because the path is absolute, this means I can't really check in
.cargo/config
since the paths may differ for my peers. This has a couple of problems:If I specify a relative path, e.g.:
Then I get:
According to https://github.com/servo/rust-url/blob/2aa249b5bbc462e5582735bdae76a27acc9d70fd/src/lib.rs#L115, this can be fixed by adding a
base_url
to theUrlParser
that is used in cargo/src/cargo/util/to_url.rsInstructions to fix this added by @carols10cents:
The text was updated successfully, but these errors were encountered: