-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
beta: cargo metadata uses inconsistent encodings of ids with branch = master
dependencies
#8756
Comments
Running @@ -1020,7 +1026,7 @@ checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
[[package]]
name = "mice"
version = "0.9.0"
-source = "git+https://github.com/Monadic-Cat/mice#264dd2d713e232709588bac3ad3ffef0aeb7eb2c"
+source = "git+https://github.com/Monadic-Cat/mice?branch=master#264dd2d713e232709588bac3ad3ffef0aeb7eb2c"
dependencies = [
"nom",
"rand 0.7.3", which then results in consistent encoding again: > cargo +beta metadata --format-version 1 | jq -r '(.packages[] | select(.name == "mice") | .id), (.resolve.nodes[].deps[] | select(.name == "mice") | .pkg)'
mice 0.9.0 (git+https://github.com/Monadic-Cat/mice?branch=master#264dd2d713e232709588bac3ad3ffef0aeb7eb2c)
mice 0.9.0 (git+https://github.com/Monadic-Cat/mice?branch=master#264dd2d713e232709588bac3ad3ffef0aeb7eb2c) but running > cargo +stable metadata --format-version 1 | jq -r '(.packages[] | select(.name == "mice") | .id), (.resolve.nodes[].deps[] | select(.name == "mice") | .pkg)'
mice 0.9.0 (git+https://github.com/Monadic-Cat/mice#264dd2d713e232709588bac3ad3ffef0aeb7eb2c)
mice 0.9.0 (git+https://github.com/Monadic-Cat/mice#264dd2d713e232709588bac3ad3ffef0aeb7eb2c)
> cargo +beta metadata --format-version 1 | jq -r '(.packages[] | select(.name == "mice") | .id), (.resolve.nodes[].deps[] | select(.name == "mice") | .pkg)'
mice 0.9.0 (git+https://github.com/Monadic-Cat/mice?branch=master#264dd2d713e232709588bac3ad3ffef0aeb7eb2c)
mice 0.9.0 (git+https://github.com/Monadic-Cat/mice#264dd2d713e232709588bac3ad3ffef0aeb7eb2c) @@ -1026,7 +1026,7 @@ checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
[[package]]
name = "mice"
version = "0.9.0"
-source = "git+https://github.com/Monadic-Cat/mice?branch=master#264dd2d713e232709588bac3ad3ffef0aeb7eb2c"
+source = "git+https://github.com/Monadic-Cat/mice#264dd2d713e232709588bac3ad3ffef0aeb7eb2c"
dependencies = [
"nom",
"rand 0.7.3", |
@alexcrichton I think this is related to #7841 and #8101. There are some oddities with how However, I'll try to investigate some more and think if all these issues can be untangled somehow. The fact that multiple |
Just an update on my investigation: New lock files include Mixed lock/toml settings cause inconsistencies Conversely, if you have a (new) I've been trying to think of a way to handle this, but haven't gotten too far, and it is getting late. My best idea is that An alternative, similar to what Alex alluded to in #8101 (comment), is to somehow "sync" the |
Sorry I haven't been able to investigate this more. It was somewhat expected that branch=master and not would be somewhat of a "soup" internally in Cargo, but the hope was that it wouldn't actually cause user-facing problems (except where warnings are emitted). Is |
I think |
That's my suspicion yeah. I'm hoping a somewhat surgical fix to only metadata/json output is necessary, and we don't have to worry too much about the "soup" of whether lockfiles have branch=master or not. |
Problem
When encoding ids of git dependencies using
branch = "master"
the encoding used in thepackages
list and theresolve
list can be inconsistent on 1.47-beta. This is a regression in this output from 1.46 causing issues incargo-*
plugins that try to use the resolve graph fromcargo metadata
.Steps
The text was updated successfully, but these errors were encountered: