-
Notifications
You must be signed in to change notification settings - Fork 103
refactor: move commands into a module hierarchy #1336
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
base: main
Are you sure you want to change the base?
Conversation
| env_logger::init_from_env(env); | ||
|
|
||
| #[cfg(feature = "winpkgidentityext")] | ||
| #[cfg(all(windows, feature = "winpkgidentityext"))] |
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 was testing the feature powerset with cargo-hack. Since the windows crate is only available on windows, it threw a compile error.
| shell: CompletionShell, | ||
| app_name: &str, | ||
| ) -> Result<()> { | ||
| pub fn generate<T: CommandFactory>(shell: CompletionShell, app_name: &str) -> Result<()> { |
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.
command::completions::generate is self-explanatory in code
| "default" => None, | ||
| _ => { | ||
| return Err(anyhow!( | ||
| _ => bail!( |
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.
Changed to bail! for consistency with other parts of the codebase
| @@ -0,0 +1,15 @@ | |||
| pub mod autoinstall; | |||
|
|
|||
| #[cfg(feature = "selfupdate")] | |||
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.
Moved feature gates to module-level where possible
| config_file::{load_mut_config_db, save_config_db, JuliaupConfigChannel}, | ||
| global_paths::GlobalPaths, | ||
| operations::garbage_collect_versions, | ||
| utils::{print_juliaup_style, JuliaupMessageType}, |
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.
Intra-file import consistency (either nested or unnested)
1f4b862 to
cde89d1
Compare
| global_paths::GlobalPaths, | ||
| jsonstructs_versionsdb::JuliaupVersionDB, | ||
| versions_file::load_versions_db, | ||
| }; |
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.
Intra-file import style
simplify call-site fixes JuliaLang#313 (partially?)
fixes #313 (partially?)
@davidanthoff, @uncomfyhalomacro
finally found enough time to implement my issue
I believe things have calmed down in this part of the codebase. The last significant commit was months ago.
I have commented every change unrelated to the module tree.