fix: resolve install-callgrind-tools.ps1 path via justfile_directory()#491
Open
kate-shine wants to merge 1 commit into
Open
fix: resolve install-callgrind-tools.ps1 path via justfile_directory()#491kate-shine wants to merge 1 commit into
kate-shine wants to merge 1 commit into
Conversation
The install-tools recipe runs as a `[script]` block, which Just writes
to a temp file before executing. `` therefore expands to
the temp directory, not the repo, so the relative lookup
`\..\scripts\install-callgrind-tools.ps1` fails with
"The term '...' is not recognized as a name of a cmdlet, function,
script file, or executable program".
Use Just's `{{justfile_directory()}}` which is interpolated at recipe
build time and always points at the repository root.
AB#7477055
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to fix just install-tools failing on Windows by making the install-callgrind-tools.ps1 invocation independent of Just’s temporary staging directory for [script] recipes.
Changes:
- Replaces
$PSScriptRoot-relative script lookup with a Just interpolation-based path. - Attempts to resolve the
scripts/install-callgrind-tools.ps1path from the Justfile location.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #491 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 331 331
Lines 24717 24717
=======================================
Hits 24717 24717 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ralfbiedert
approved these changes
Jun 12, 2026
sandersaares
approved these changes
Jun 12, 2026
sandersaares
approved these changes
Jun 12, 2026
|
|
||
| # Install platform-specific benchmark toolchain (Callgrind, Linux-only). | ||
| & (Join-Path $PSScriptRoot ".." "scripts" "install-callgrind-tools.ps1") | ||
| & (Join-Path '{{justfile_directory()}}' "scripts" "install-callgrind-tools.ps1") |
Member
There was a problem hiding this comment.
Is ox-sdk similarly afflicted or how come we did not notice it there?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
just install-toolsfailure on Windows reported in AB#7477055.Problem
The
install-toolsrecipe is declared as[script]. Just writes script recipes to a temporary file (%TEMP%\just-XXXXXX\install-tools.ps1) before executing them with the configured interpreter. As a result, `` inside the recipe resolves to that temp directory rather than the repo, and the relative lookup\..\scripts\install-callgrind-tools.ps1does not exist:Fix
Use Just's built-in
{{justfile_directory()}}interpolation, which is expanded at recipe-build time and always points at the repository root — independent of where Just chooses to stage the script file.Validation
Callgrind toolchain is Linux-only; skipping.(script's intended Windows behavior).