Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ stack test --test-arguments --accept
- `# no toplevel` - don't wrap in taskrunner
- `# s3` - enable S3 testing
- `# github keys` - provide GitHub credentials
- When testing toplevel vs subtask behavior, use real nesting (default toplevel wrapping + inner `taskrunner` calls) rather than manually setting internal env vars like `_taskrunner_build_id`

## Key Commands for Development

Expand Down
3 changes: 3 additions & 0 deletions src/App.hs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ main = do

m_hashToSave <- readIORef appState.hashToSaveRef

when (skipped && isNothing m_hashToSave && appState.isToplevel) do
logInfo appState "skipped, inputs unchanged"

-- Only be chatty about exit status if we were chatty about starting the work, i.e. if it is cacheable.
when (not skipped && isJust m_hashToSave) do
if exitCode == ExitSuccess then
Expand Down
1 change: 1 addition & 0 deletions test/t/file-input-unchanged-force.out
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ should compute again:
[mytask] stdout | Expensive computation
[mytask] info | success
should not compute again:
[mytask] info | skipped, inputs unchanged
1 change: 1 addition & 0 deletions test/t/file-input-unchanged.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
[mytask] info | Inputs changed, running task
[mytask] stdout | Expensive computation
[mytask] info | success
[mytask] info | skipped, inputs unchanged
1 change: 1 addition & 0 deletions test/t/file-input-with-spaces-unchanged.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
[mytask] info | Inputs changed, running task
[mytask] stdout | Expensive computation
[mytask] info | success
[mytask] info | skipped, inputs unchanged
1 change: 1 addition & 0 deletions test/t/raw-input-unchanged.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
[mytask] info | Inputs changed, running task
[mytask] stdout | Expensive computation, input is: lol
[mytask] info | success
[mytask] info | skipped, inputs unchanged
4 changes: 4 additions & 0 deletions test/t/subtask-skip-no-message.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- output:
[mytask] info | Inputs changed, running task
[mytask] stdout | Running task
[mytask] info | success
13 changes: 13 additions & 0 deletions test/t/subtask-skip-no-message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
echo lol > input.txt
git init -q
git add input.txt

go() {
taskrunner -n mytask bash -e -c '
snapshot input.txt
echo "Running task"
'
}

go
go
5 changes: 5 additions & 0 deletions test/t/toplevel-skip-message.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- output:
[mytask] info | Inputs changed, running task
[mytask] stdout | Running task
[mytask] info | success
[mytask] info | skipped, inputs unchanged
13 changes: 13 additions & 0 deletions test/t/toplevel-skip-message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# no toplevel
echo lol > input.txt
git init -q
git add input.txt

go() {
taskrunner -n mytask bash -e -c '
snapshot input.txt
echo "Running task"
'
}
go
go
Loading