-
Notifications
You must be signed in to change notification settings - Fork 1
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
Make paths msys2
friendly
#2
base: main
Are you sure you want to change the base?
Conversation
]) | ||
.output() | ||
.expect("Failed to clone dtrace"); | ||
fn build_dtrace() -> anyhow::Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's no Err
variant. Why even return a result?
Command::new("git") | ||
.arg("udpate") | ||
.current_dir(DTRACE_SRC_DIR) | ||
.output() | ||
.expect("Failed to update dtrace"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git update
is not a valid command.
println!("> git update/clone {output:?}"); | ||
|
||
let output = Command::new("powershell.exe") | ||
.arg("-F") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-F
is not a valid option to powershell.
.args(&[".\\build-dtrace.ps1"]) | ||
println!("> git update/clone {output:?}"); | ||
|
||
let output = Command::new("powershell.exe") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this output, build logs get generated inside dtrace directory not in stdout
std::path::Path::new(&dir) | ||
.join(DTRACE_SRC_DIR) | ||
.join("dtrace/build/x64/Release/lib") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong path, evaluates to libdtrace-rs\_dtrace\dtrace/build/x64/Release/lib
Should be libdtrace-rs\target\_dtrace/build/x64/Release/lib
.args(&[ | ||
"clone", | ||
"https://github.com/microsoft/DTrace-on-Windows.git", | ||
DTRACE_SRC_DIR, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't clone anything inside root directory, use the target
directory for any external dependencies
build.rs
Outdated
@@ -68,7 +64,7 @@ fn build_dtrace() { | |||
.output() | |||
.expect("Failed to clone dtrace"); | |||
|
|||
Command::new("powershell") | |||
let _ = Command::new("powershell") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this result at all.
Failing to build on my machine, the include paths have changed.
|
After fixing the include paths, the tests fail with
|
With current paths, the build will fail in msys2 terminal on Windows. This PR changes the paths.