The GitHub Actions job "Required Checks" on 
texera.git/test/pybuilder-bad-neighbor-real-compile-check has succeeded.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
8896f51a60f536b3d4179063dc03a9c283ded45c / Xinyuan Lin <[email protected]>
test(pybuilder): make the bad-neighbour boundary sweep actually compile its 
snippets

`PythonTemplateBuilderSpec`'s exhaustive bad-neighbour test passed
vacuously. Its `assertToolboxDoesNotCompile` helper wrapped each snippet
in a `package ... { }` clause before handing it to a runtime `ToolBox`,
and a ToolBox cannot wrap a `PackageDef` into its synthetic `__wrapper`
method: `tb.compile` dies during typer with a bare
`java.lang.AssertionError: assertion failed: method wrapper` for any
input, the empty string included. The helper's `intercept[Throwable]`
therefore succeeded unconditionally, and all 130 assertions in the sweep
passed without the `pyb` macro ever expanding.

Rebuild the sweep on the technique `BoundaryValidatorSpec` documents:
compile a block rather than a package clause and assert on the captured
`ToolBoxError` message, which distinguishes a `validateCompileTime`
abort (carrying the specific boundary reason) from a benign expansion
whose only failure is the `private[amber]` `fromInterpolated` access
error. Each of the 65 bad-neighbour characters is now required to abort
with its own templated reason and its own character, on both sides:
130 real macro expansions.

Also fix a second vacuity in the same test: it derived its character set
from `PythonLexerUtils.isBadNeighbor`, the predicate it claims to pin,
so shrinking the predicate would have shrunk the sweep's input instead
of failing it. Both sets are now spelled out as literals, and a new
complementary test requires the 29 safe-neighbour characters to produce
the benign outcome (57 cases), so the assertion discriminates in both
directions. A third new test pins `#` as a left neighbour aborting for
the comment rule rather than the neighbour rule.

Drop `inPybuilderPkg`, `assertToolboxDoesNotCompile` and
`scalaUnicodeEscape`, which had no other user. The escape helper was
broken too: it emitted `\u0041` with two backslashes, nothing rewrites
that inside the generated triple-quoted literal, and the abort message
shows the macro's neighbour was the digit `1`, never `A`.

Test-only change. 184 -> 186 tests in the module, 0 failures on both
sides, nothing removed or renamed.

Report URL: https://github.com/apache/texera/actions/runs/33870897980

With regards,
GitHub Actions via GitBox

Reply via email to