Handle parsing a PackageId that is a raw registry url into a Crate#758
Handle parsing a PackageId that is a raw registry url into a Crate#758emilyalbini merged 10 commits intorust-lang:masterfrom
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, |
emilyalbini
left a comment
There was a problem hiding this comment.
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 |
|
|
|
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.