-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add third party registry support #945
base: main
Are you sure you want to change the base?
Add third party registry support #945
Conversation
This adds a `--registry` command line flag to the check release capabilities. The argument to the flag is the name of the registry to use to lookup the crates when using the default behavior or --baseline-version. If left unset, the default behavior remains of --checking crates.io.
@@ -16,6 +16,8 @@ pub struct GlobalConfig { | |||
stdout: AutoStream<Box<dyn Write + 'static>>, | |||
stderr: AutoStream<Box<dyn Write + 'static>>, | |||
feature_flags: HashSet<FeatureFlag>, | |||
/// Registry name to look up crates in | |||
registry: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if this was the best place to stash the registry flag from the cli. It seems like its okay, but I can't say I did a deep dive of the code to fully understand all the components.
I haven't added any tests for this. I'm not sure what the easiest way to add tests for a third party registry. Do you have any ideas on that front? I could wire up a test to basically just pass As far as third party registries, one thought I had was to setup a static file based registry with Let me know what route you would prefer and some pointers on where exactly the tests should go. |
See also #879 for some discussion about using |
Rebased and reworked this PR against the latest |
This adds a
--registry
command line flag to the check release capabilities. The argument to the flag is the name of the registry to use to lookup the crates when using the default behavior or --baseline-version. If left unset, the default behavior remains of --checking crates.io.This is intended to address #160.
I avoided trying to do any auto detection based on
publish
fields. That seemed like it might be less obvious from a behavior perspective to me, but maybe it would make things smoother for the user.