Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Support for multiple registries! #213

Open
mingley opened this issue Sep 19, 2023 · 5 comments · Fixed by BarbossHack/crates-io#2
Open

Support for multiple registries! #213

mingley opened this issue Sep 19, 2023 · 5 comments · Fixed by BarbossHack/crates-io#2

Comments

@mingley
Copy link

mingley commented Sep 19, 2023

Is your feature request related to a problem? Please describe.

Some users operating in a theoretical enterprise environment might have both external and internal crate registries being utilized.

Currently the option in the plugin to modify the index server URL supports only one value.

image

Describe the solution you'd like
Ideally this plugin supports a collection of index servers that can be checked against in parallel. Additional overhead could be reduced by matching against whatever registry value is provided in the crate manifest Cargo.toml for a given dependency.

For example, in a random Cargo.toml

[dependencies]
something_internal = { version = "0.2.3", registry = "internal" } // registry provided here, match on name
serde = { version = "1.0", features = ["derive"] } // no registry provided here, assume external

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

I haven't raised a lot of issues before so let me know if you need any more information, I could also work on this myself if you don't have the bandwidth for it! Let me know :)

Additional context

@yanqd0
Copy link

yanqd0 commented Oct 8, 2023

I have the same development environment. Hope this requirement to be implemented soon.

@pwnorbitals
Copy link

Yes, interested too !

@serayuzgur
Copy link
Owner

Hi, @mingley thanks for the issue, I don't have the time right now but you are welcome. There is something that tickles my mind, performance. The solution you provided may prevent it but since it is an extension to cargo toml, I believe we have to document it briefly and we have to make it more verbose.
For ex. we use # crates: disable-check for ignore dependency, you can take a look at that.

woutersl added a commit to cenotelie/crates that referenced this issue Nov 16, 2023
woutersl added a commit to cenotelie/crates that referenced this issue Dec 11, 2023
woutersl added a commit to cenotelie/crates that referenced this issue Dec 11, 2023
@SVilgelm
Copy link

I'm also interested in this feature, we use several dependencies from private registries, and it is a bit annoying, that the extension shows an error for those dependencies.

@SVilgelm
Copy link

And it would be great, if the extension can automatically pick the registries and overrides up from the .cargo/config.toml file

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants