-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Suggest cargo install --git when missing registry package looks like a git* URL #10522
Suggest cargo install --git when missing registry package looks like a git* URL #10522
Commits on Apr 1, 2022
-
Heuristically identify git URL by matching the pattern "git" in the domain. Add a special case error with a fixit hint to help users rerun the correct cargo install command
Configuration menu - View commit details
-
Copy full SHA for b87ae28 - Browse repository at this point
Copy the full SHA b87ae28View commit details -
Refactor select_dep_pkg error handling
Create a local Error type that that wraps existing error handling code Giving the three error variants names improves readability and makes it easier to recognise duplicate code Move all string operations to create errors from 3 separate bail! calls into anyhow::anyhow! calls that are encapsulated in the From<> impl
Configuration menu - View commit details
-
Copy full SHA for 174c80e - Browse repository at this point
Copy the full SHA 174c80eView commit details
Commits on Apr 12, 2022
-
Revert "Refactor select_dep_pkg error handling"
This reverts commit 174c80e.
Configuration menu - View commit details
-
Copy full SHA for 869973f - Browse repository at this point
Copy the full SHA 869973fView commit details -
Merge remote-tracking branch 'upstream/master' into n10485_install_fr…
…om_git_error_message_alternative_impl
Configuration menu - View commit details
-
Copy full SHA for e045b4f - Browse repository at this point
Copy the full SHA e045b4fView commit details
Commits on Apr 13, 2022
-
Experiment with GitUrl to generate the suggestion
Add a test case for a git@ repo and refactor the method to return Option<String> instead of bool. Reword the suggestion to follow rustc guidelines
Configuration menu - View commit details
-
Copy full SHA for 1c9c53b - Browse repository at this point
Copy the full SHA 1c9c53bView commit details -
Make GitUrl parsing and normalisation defensive. Create a type for InstallSuggestion and pass it to the anyhow error message
Configuration menu - View commit details
-
Copy full SHA for ef7ee2c - Browse repository at this point
Copy the full SHA ef7ee2cView commit details
Commits on Aug 20, 2023
-
Merge remote-tracking branch 'upstream/master' into n10485_install_fr…
…om_git_error_message_alternative_impl
Configuration menu - View commit details
-
Copy full SHA for e018509 - Browse repository at this point
Copy the full SHA e018509View commit details -
Configuration menu - View commit details
-
Copy full SHA for 283c6e8 - Browse repository at this point
Copy the full SHA 283c6e8View commit details
Commits on Aug 21, 2023
-
Replace git-url-parse with gix::url::parse
Keep the dependency try the same by leveraging already imported gix crate to try parsing a git url from a string
Configuration menu - View commit details
-
Copy full SHA for ddea258 - Browse repository at this point
Copy the full SHA ddea258View commit details -
Limit the actionable error to install https inputs
Since I opened the PR, cargo started supporting `crate@version` command-line inputs rust-lang@2806270 and now the test input `git@bitbucket.org:jcmoyer/rust-tictactoe.git` is parsed as a version string, which fails the code path I added only deals with strings that weren't erroneously parsed as version strings, so the section I highlighted above won't be traversed, because `git@` strings now fail to parse as version strings before they get here. Delete the failing test
Configuration menu - View commit details
-
Copy full SHA for f08e95b - Browse repository at this point
Copy the full SHA f08e95bView commit details