mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Use nu-path
correctly in nu!
test macro to make dev-dependency transitive (#7488)
## Fix `nu-path` usage in `nu!` testing macro The `nu-path` crate needs to be properly re-exported so the generated code is valid if `nu-path` is not present among the dependencies of the using crate. Usage of crates in `macro_rules!` macros has to follow the `$crate::symbol_in_crate` path pattern (With an absolute path-spec also for macros defined in submodules) ## Move `nu-test-support` to devdeps in `nu-protocol` Also remove the now unnecessary direct dependency on `nu-path`. `nu!` macro had to be changed to make it a proper transitive dependency.
This commit is contained in:
committed by
GitHub
parent
e215fbbd08
commit
24848a1e35
@ -138,7 +138,7 @@ macro_rules! nu {
|
||||
let test_bins = $crate::fs::binaries();
|
||||
|
||||
let cwd = std::env::current_dir().expect("Could not get current working directory.");
|
||||
let test_bins = nu_path::canonicalize_with(&test_bins, cwd).unwrap_or_else(|e| {
|
||||
let test_bins = $crate::nu_path::canonicalize_with(&test_bins, cwd).unwrap_or_else(|e| {
|
||||
panic!(
|
||||
"Couldn't canonicalize dummy binaries path {}: {:?}",
|
||||
test_bins.display(),
|
||||
|
Reference in New Issue
Block a user