[tests] avoid codebase mixup in display tests #11959
Merged
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.
Issue: our display tests run with the whole
tests/display/src
folder as classpath, and in some weird cases some modules from our display test codebase gets included there (#11958 is an example of something that is pulling it) and causes "random" CI failures like https://github.com/HaxeFoundation/haxe/actions/runs/13027188761/job/36338795090?pr=11957 or #8556.Solution: isolate actual code from the display test from the test codebase / "framework"
This is actually not enough, as there is another issue that I dodged for now to at least avoid those random CI failures.
Issue is with
display/references
, that will look in modules seen by classpath exploration (so here,std
; used to also include a bunch of things from our tests, too) for modules that have identifiers with matching name (so #5172'si
, #6405'se
andcases.Super
'ssuper
are obvious problems here) and type them, even if they're not compatible with current context (display tests arecross
, and thus not compatible withhaxe.macro
andsys.thread
packages, for example).Why this only happens with some particular builds is beyond me atm.