Generate valid Java code from invalid PIE code #292
Labels
Component: code generation
Something that concerns the generated code
Priority: low
Status: proposal
Enhancement in the proposal stage
Type: enhancement
New feature or request
Summary
Generate stubs with a RuntimeException from invalid PIE code
Todo
Reason
Useful while developing and you want to test some code while other, unrelated code still has errors. See this blog post for detailed reasoning.
Description
When generating Java code from PIE code with errors, generate a stub that throws a NotImplementedException. If the error is in an expression, still generate code for all expressions before it.
Implementation
Probably requires removing all
with
in the compiler and handling strategy failure gracefully. For example, use these strategies:Testing is not possible within the current test project, as that will fail the Spoofax build if the PIE code has errors. This might be configurable though.
Related issues
The text was updated successfully, but these errors were encountered: