Skip to content
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

cargo-lock translator throwing error when same dependency added from different sources in different packages #480

Open
zyansheep opened this issue Mar 1, 2023 · 1 comment
Assignees
Labels
bug Something isn't working rust

Comments

@zyansheep
Copy link

Hello! I found an error :D

Error

> nix develop
error: attribute 'metadata' missing

       at /nix/store/9ky8w9ynamwx3qxx0zqifsnw37jj3xk0-source/src/subsystems/rust/translators/cargo-lock/default.nix:104:7:

          103|     in
          104|       parsedLock.metadata."${key}";
             |       ^
          105|
(use '--show-trace' to show detailed location information)

Reproduction

./Cargo.toml:

[package]
name = "nci-test"
version = "0.1.0"
edition = "2018"

[dependencies]
log = "0.3" # Also fails if the same version as Git (i.e. 0.4)
subcrate = { path = "subcrate" }

./subcrate/Cargo.toml

[package]
name = "subcrate"
version = "0.1.0"
edition = "2018"

[dependencies]
log = { git = "https://github.com/rust-lang/log" }

MRE repo: https://github.com/zyansheep/nci-test

@yusdacra yusdacra self-assigned this Mar 1, 2023
@yusdacra yusdacra added bug Something isn't working rust labels Mar 1, 2023
@yusdacra
Copy link
Member

I merged #481, it doesn't actually fix this but it adds support to fix this into dream2nix itself. cargo's vendoring functionality needs to be fixed in order for this to be fixed. (see rust-lang/cargo#10310)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rust
Projects
None yet
Development

No branches or pull requests

2 participants