-
Notifications
You must be signed in to change notification settings - Fork 331
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
Cannot parse "scp-style" git URLs #220
Comments
It’s valid for I’d recommend having your own code recognize what kind of input you have, only give some of them to rust-url, and parse the others yourself. |
Ah then perhaps this is an issue with cargo.
From what you're saying, Url::parse should not be expected to parse this git clone url type. |
Yes, that's what I'm saying. |
@nipunn1313 For your reference: https://url.spec.whatwg.org/#syntax-url |
Thanks for the help. Closing this out since it doesn't make sense to implement this here. |
I'd like you to reconsider opening this issue. I suspect there are enough scp-style not-URLs in the wild that the usefulness of adding a parser for them in Not supporting scp-style forces consumers of
The first choice is unergonomic for developers. The second results in an ecosystem of tools that return I want to close that issue, and I would prefer to do that in a way that potentially benefits all users of The conversion between scp-style and true-url, as I understand it, is simply rewriting (or reinterpreting) the My preferred way of solving this is to implement Feature-gating the method seems like overkill, but is an option. I would also like to add a check for scp-style urls to the return path of |
My response at #424 (comment) also applies here. |
Short code to highlight issue:
The first line parses, but the second fails with
thread 'main' panicked at 'called
Result::unwrap()
on anErr
value: RelativeUrlWithoutBase', ../src/libcore/result.rs:788straight from
git help clone
we see that the second is a valid formatSee https://secure.phabricator.com/T11004 for an explanation why the "scp-like" syntax is not exactly the same as the ssh syntax. For me, switching to the ssh style syntax is insufficient on its own.
The text was updated successfully, but these errors were encountered: