-
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
Areas requiring agreement for stabilization of alternative registries #4688
Comments
I have a few things to discuss:
What do you think? |
Seems like there's no reason to put on it any more restrictions than what toml does, right? If your name is silly, you might need to quote & escape it in some places but toml supports arbitrary unicode strings both as table names and keys, afaik.
Does this mean it needs to accept a |
As implemented in #4680, I have added support for cargo login to store the token in the credentials file, but only if it is provided, if not it returns an error. When you want to publish to an alternate registry you then must provide |
Perhaps, yeah, but Cargo often has things show up in weird places. For example you can specify configuration through an environment variable, and I don't actually know what that would do if you tried to specify a registry with a I was basically thinking that we could stick to a conservative set of names and then expand it later if we wanted.
Ah sorry what I meant is that if you type |
Before stabilization, I would like to see the index specification in cargo's docs rather than in the text of RFC 2141, so that it can be more easily discovered and corrected/modified. |
@carols10cents having a "living" document one can point to is a great idea. The RFC should mention it so that readers don't mistake the RFC for such a living document. |
The credentials file format has been changed to be a subset of [registry]
token = ".." # crates.io token
[registries.custom-registry-name]
token = ".." # custom registry token |
Registry names are also now a purely local concern, so I don't think we necessarily need to put any restrictions on what they look like. |
As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it. I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect? The team would be especially grateful if such a comment included details such as:
Thank you for contributing! If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable! |
This is still relevant because none of the alternative registry stuff has been stabilized yet and we'd like it to be, presumably. There's a decent list of TODO items in the description of this issue and the comments; some of them definitely haven't been completed yet. To move this forward, folks could investigate and see if the tasks in this issue have been completed yet and note as such, and if they haven't been completed, work on them or ask for help in working on them. |
Not 100% sure if that fits here, but that I noticed and think that should maybe be addressed before stabilization of alternative registries: The token is not sent on all routes the registry and I wonder if there would be a downside to doing so. I have a use-case where it would be desirable to also receive the token on other API endpoints such as the download route, so the registry server can respond according to configuration tied to the token. |
One other concern to add - it doesn't seem possible to override dependencies from alternate registries using [dependencies]
"bar" = { registry = "foo", version = "1" }
[patch.foo]
"bar" = { path = "../my-local-bar-copy" } Just specfiying the registry URL in the |
Patches do work, but you need to do it via the URL rather than the registry name: [patch."ssh://git@github.com/my-org/my-internal-index"]
bar = { path = "../my-local-bar-copy" } There an open issue here to switch over to the |
Aha! Sorry for not spotting that. Thanks for the speedy reply. |
Restrict registry names to same style as package names. See #4688 (comment)
Stabilize Alternative Registries This includes a few minor changes besides stabilizing: - `cargo search` won't display `crates.io` search URL for extra results for non-crates.io registries. - Document using environment variables for API tokens. - Explicit section in `config.md` for documenting the credentials file. Closes rust-lang/rust#44931 Closes rust-lang/crates-io-cargo-teams#21 Closes #6589 Closes #4688
Below are a list of current concerns that @alexcrichton raised as wanting resolution before alternative registries becomes stable:
login
,owner
,publish
,search
, andyank
have--registry
as an argument, taking a registry identifierfoo.bar.baz
? Justfoo-bar
? What aboutfoo-💖
?cargo login
doesn't work without a token for a custom registry, it just returns an error instead of printing a URL to visit and reading the token from a promptPlease add to the list to include any other concerns.
The text was updated successfully, but these errors were encountered: