What the compiled run did not run - #973
Merged
Merged
Conversation
deed test examples 138 passed, 0 failed
deed test examples --compiled 111 passed, 0 failed
Twenty-seven blocks are missing from the second line and nothing said so. Both
outputs read like a complete run, and the one on the right is the one somebody
reaches for to find out whether the backend agrees with the interpreter.
The same sentence hid the harder case. A file the backend refuses outright
printed `no tests found in the compiled backend` and exited zero, which is
word for word what a file with no tests in it prints. Twice this week I read
that line and believed it.
Skipping is right and stays: the backend compiles a subset of the language on
purpose, and `deed build` has always named what it could not take. What was
wrong is that three different facts arrived as one silence, and one of them was
the absence of an answer rather than an answer.
`deed_mir::Program` now carries `skipped_tests`, so a block that fails to lower
keeps its name and its reason instead of dropping them at `Err(_)`. The runner
prints all three cases the same way:
111 passed, 0 failed
6 not compiled, so they were not run
examples/kv_store.deed: a literal missing a field is not lowered yet
examples/transfer.deed: test "moves the money and conserves the total": a
shorthand field naming something that is not a local is not lowered yet
Reading it back is the point of the change: three of the six are in the running
example, and the two shapes behind them are named for the first time.
The exit code does not move. "The backend compiles a subset" is a written
decision and this is not the change that reopens it; what was missing was the
number, not the failure.
`corpus_backend.rs` asked about modules and never about the `test` blocks
inside them, which is how twenty-seven of them went unnoticed. It asks now, and
pins the count in both directions: fewer is the backend catching up and worth
reading, more is a shape that used to compile and no longer does.
Measured and left alone: the compiled path runs no property tests at all, which
is the rest of the difference between the two numbers. That is a missing
runner rather than a silent skip, so it is not counted here.
Break-verified three ways, each failing by name: dropping the reason in the
lowering, silencing the report, and each of the two CLI cases on its own.
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.
Twenty-seven blocks are missing from the second line and nothing said so. Both outputs read like a complete run, and the one on the right is the one somebody reaches for to find out whether the backend agrees with the interpreter.
The same sentence hid the harder case. A file the backend refuses outright printed
no tests found in the compiled backendand exited zero — word for word what a file with no tests in it prints. Twice this week I read that line and believed it.What changes
Skipping is right and stays: the backend compiles a subset of the language on purpose, and
deed buildhas always named what it could not take. What was wrong is that three different facts arrived as one silence, and one of them was the absence of an answer rather than an answer.deed_mir::Programnow carriesskipped_tests, so a block that fails to lower keeps its name and its reason instead of dropping them atErr(_). The runner prints all three cases the same way:Reading that back is the point of the change: three of the six are in the running example, and the two shapes behind them — a literal missing a field, and a shorthand field naming something that is not a local — are named for the first time.
The exit code does not move. "The backend compiles a subset" is a written decision and this is not the change that reopens it. What was missing was the number, not the failure.
Held by
corpus_backend.rsasked about modules and never about thetestblocks inside them, which is how twenty-seven of them went unnoticed. It asks now, and pins the count in both directions: fewer is the backend catching up and worth reading, more is a shape that used to compile and no longer does.Two CLI tests, one per case: a named block with its reason, and a refused file that no longer claims to have nothing in it.
Break-verified three ways, each failing by name: dropping the reason in the lowering, silencing the report, and each CLI case on its own.
Measured and left alone
The compiled path runs no property tests at all, which is the rest of the difference between 138 and 111. That is a missing runner rather than a silent skip, so it is not counted here.