Open
Description
Hi!
I'm having some trouble when using crates from a repository which defines a workspace (multiple crates).
Here are the relevant bits of my example:
Cargo.toml
[dependencies]
virtual-dom-rs = { git = "https://github.com/chinedufn/percy", rev="c5798a9f46719cf358c58b934110a59706c00f4d" }
Cargo.lock
[[package]]
name = "html-macro"
version = "0.1.9"
source = "git+https://github.com/chinedufn/percy?rev=c5798a9f46719cf358c58b934110a59706c00f4d#c5798a9f46719cf358c58b934110a59706c00f4d"
dependencies = [
"html-validation",
"proc-macro2 0.4.30",
"quote 0.6.13",
"syn 0.15.44",
]
[[package]]
name = "html-validation"
version = "0.1.2"
source = "git+https://github.com/chinedufn/percy?rev=c5798a9f46719cf358c58b934110a59706c00f4d#c5798a9f46719cf358c58b934110a59706c00f4d"
dependencies = [
"lazy_static",
]
[[package]]
name = "virtual-dom-rs"
version = "0.6.14"
source = "git+https://github.com/chinedufn/percy?rev=c5798a9f46719cf358c58b934110a59706c00f4d#c5798a9f46719cf358c58b934110a59706c00f4d"
dependencies = [
"html-macro",
"js-sys",
"virtual-node",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "virtual-node"
version = "0.2.7"
source = "git+https://github.com/chinedufn/percy?rev=c5798a9f46719cf358c58b934110a59706c00f4d#c5798a9f46719cf358c58b934110a59706c00f4d"
dependencies = [
"html-validation",
"js-sys",
"lazy_static",
"wasm-bindgen",
"web-sys",
]
The error:
++ crate2nix generate -f ./Cargo.toml -o Cargo-generated.nix -h /nix/store/[...]-crate2nix/crate-hashes.json
Error: while retrieving metadata about ./Cargo.toml: Error during execution of `cargo metadata`: error: could not load Cargo configuration
Caused by:
could not parse TOML configuration in `/nix/store/[...]-crate2nix/cargo/config`
Caused by:
could not parse input as TOML
Caused by:
redefinition of table `source.https://github.com/chinedufn/percy` for key `source.https://github.com/chinedufn/percy` at line 10 column 1
and the cargo/config
file referenced in the error:
[source.crates-io]
replace-with = "vendored-sources"
[source."https://github.com/chinedufn/percy"]
git = "https://github.com/chinedufn/percy"
rev = "c5798a9f46719cf358c58b934110a59706c00f4d"
replace-with = "vendored-sources"
[source."https://github.com/chinedufn/percy"]
git = "https://github.com/chinedufn/percy"
rev = "c5798a9f46719cf358c58b934110a59706c00f4d"
replace-with = "vendored-sources"
[source."https://github.com/chinedufn/percy"]
git = "https://github.com/chinedufn/percy"
rev = "c5798a9f46719cf358c58b934110a59706c00f4d"
replace-with = "vendored-sources"
[source."https://github.com/chinedufn/percy"]
git = "https://github.com/chinedufn/percy"
rev = "c5798a9f46719cf358c58b934110a59706c00f4d"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "/nix/store/zl9cqslk607nr8hvbgnpl5jj3bxg5vxv-deps"
It seems like some deduplication is necessary
And here is a direct link to the dependency's Cargo.toml: https://github.com/chinedufn/percy/blob/c5798a9f46719cf358c58b934110a59706c00f4d/Cargo.toml