-
Notifications
You must be signed in to change notification settings - Fork 97
Handle parsing a PackageId that is a raw registry url into a Crate #758
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
Conversation
b57c8b0 to
b4bfa7b
Compare
|
Looking a bit further it looks like in 1.77/1.78 cargo switched to packeg id spec. Should I add a todo comment for implementing the parsing of the package id spec completly and cleaning up the old package id parsing? Other than that I would consider this ready for review. |
7ff2109 to
cadabce
Compare
|
I have replaced the manual URL parsing code, |
pietroalbini
left a comment
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'm glad you found a package to parse the IDs :D
Left a small comment. Also, as before, I think we should not set the version to "unknown" if it's missing, but error out instead, as I don't know how the rest of Crater would handle it.
I think I missed that remark last time, I will change that then. |
instead of manual disecting the string
as sugested by epage rust-lang/cargo#15048 (comment)
59184f2 to
83c1482
Compare
|
Ok, I have rebased to resolve merge conflicts and addressed your remarks regarding turning missing version into I think how I handle the |
- github strips `.git` suffixes when attempting to create a new repo ending in `.git` so this should be unambiguouse - for other repos I hope they also don't allow creating repos with names ending in `.git`
83c1482 to
a3b18eb
Compare
|
Tags, Branches and non-hex revs now result in |
pietroalbini
left a comment
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.
Thanks! ❤️
|
|
|
Ok, I have now updated the |
I noticed that a lot of errors that I would expect to be categorized as
DependsOn(_)would end up asUnknowninstead.It looks like cargo sets the
package_idfield in the json output toregistry+https://github.com/rust-lang/crates.io-index#{crate_name}@{crate_version}which wan't handled byCrate::try_from.As a result no crate would be inserted into the
depsset and it wasn't able to differentiate between an emptydepsset due to no errors in dependencies and an emptydepsset because thepackage_ids field of failing deps couldn't be parsed into aCrate.