-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement base paths (RFC 3529) 1/n: path dep and patch support
- Loading branch information
1 parent
403bc5b
commit 0736fa6
Showing
7 changed files
with
515 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3028,3 +3028,45 @@ foo v0.0.0 ([ROOT]/foo) | |
|
||
assert_eq!(p.read_file("Cargo.lock"), p.read_file("Cargo.lock.orig")); | ||
} | ||
|
||
#[cargo_test] | ||
fn patch_with_base() { | ||
let bar = project() | ||
.at("bar") | ||
.file("Cargo.toml", &basic_manifest("bar", "0.5.0")) | ||
.file("src/lib.rs", "pub fn hello() {}") | ||
.build(); | ||
Package::new("bar", "0.5.0").publish(); | ||
|
||
let p = project() | ||
.file( | ||
".cargo/config.toml", | ||
&format!( | ||
"[path-bases]\ntest = '{}'", | ||
bar.root().parent().unwrap().display() | ||
), | ||
) | ||
.file( | ||
"Cargo.toml", | ||
r#" | ||
[package] | ||
name = "foo" | ||
version = "0.5.0" | ||
authors = ["[email protected]"] | ||
edition = "2018" | ||
[dependencies] | ||
bar = "0.5.0" | ||
[patch.crates-io.bar] | ||
path = 'bar' | ||
base = 'test' | ||
"#, | ||
) | ||
.file("src/lib.rs", "use bar::hello as _;") | ||
.build(); | ||
|
||
p.cargo("build -v -Zpath-bases") | ||
.masquerade_as_nightly_cargo(&["path-bases"]) | ||
.run(); | ||
} |
Oops, something went wrong.