From 8ce0d029718c8288c10eb4331f86b1bd48bda20d Mon Sep 17 00:00:00 2001 From: Eh2406 Date: Thu, 28 May 2020 15:43:30 -0400 Subject: [PATCH] confirm that it is not a bug at resolver level --- crates/resolver-tests/tests/resolve.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/crates/resolver-tests/tests/resolve.rs b/crates/resolver-tests/tests/resolve.rs index 4ba0f9ba4e7..337f422ab65 100644 --- a/crates/resolver-tests/tests/resolve.rs +++ b/crates/resolver-tests/tests/resolve.rs @@ -1458,6 +1458,31 @@ fn conflict_store_more_then_one_match() { let _ = resolve_and_validated(vec![dep("nA")], ®, None); } +#[test] +fn bad_lockfile_from_8249() { + let input = vec![ + pkg!(("a-sys", "0.2.0")), + pkg!(("a-sys", "0.1.0")), + pkg!(("b", "0.1.0") => [ + dep_req("a-sys", "0.1"), // should be optional: true, but not deeded for now + ]), + pkg!(("c", "1.0.0") => [ + dep_req("b", "=0.1.0"), + ]), + pkg!("foo" => [ + dep_req("a-sys", "=0.2.0"), + { + let mut b = dep_req("b", "=0.1.0"); + b.set_features(vec!["a-sys"]); + b + }, + dep_req("c", "=1.0.0"), + ]), + ]; + let reg = registry(input); + let _ = resolve_and_validated(vec![dep("foo")], ®, None); +} + #[test] fn cyclic_good_error_message() { let input = vec![