Related to the above - is there a directive to ins...
# compiler
z
Related to the above - is there a directive to instruct the compiler to stop if an error is reported to message collector during an IR dump? I've found it proceeds past it, resulting in a lot of noise because it ends up generating invalid/incomplete bytecode
d
There is an infrastructure implemented around PhasedPipelineChecker. In a simple words, you need: 1. Make your test to run the whole compilation pipeline (ensure that there is a frontend, fir2ir and backend facades) 2. Register the checker
Copy code
defaultDirectives {
    LATEST_PHASE_IN_PIPELINE with TestPhase.BACKEND
}
useAfterAnalysisCheckers(::PhasedPipelineChecker)
Now you can (actually you have to) add a
// RUN_PIPELINE_TILL: FRONTEND/FIR2IR/BACKEND
directive to all testdata files to specify what is the latest pipeline phase which is expected to run. If the directive is not specified or set not correctly, the infra will automatically propose you how you should modify the testdata.
The logic of this checker is the following: the test still runs all steps of the pipeline, but the checker groups all failed exceptions from facades and handlers by phases and then automatically mutes everything after the phase specified in
RUN_PIPELINE_TILL
. Originally we implemented this to be able to run backends on our diagnostics testdata (at least for these tests which don't contain errors in them).
You can check the AbstractFirPhasedDiagnosticTest. It's our main runner for this setup.