-
-
Notifications
You must be signed in to change notification settings - Fork 358
04 PhIP ReparseAfterSourceEditing Cleanup
The compiler right now tries to handle missing variable definitions "on the fly" as part of the OCUndeclaredVariableWarning exception.
This leads to lots of complex code (see ReparseAfterSourceEditing) to handle the case when the source gets edited during the handling of the exception.
If we step back, it seems we do not need this complexity at all.
The idea to handle variable definition during the exception was just done as there was no way to handle it later. But with our current tooling, we already show icons in the text editor when an undeclared variable is seen (which can happen e.g. when compiling in non-interactive mode).
This PhiP proposes to do the following:
- improve the icon in the editor to have a good "repair action” for Undeclared Variables
- remove the current exception handling code and just compile Undeclared Variables even in interactive mode.
This change will radically simplify the exception handling code in the compiler. In addition, it improves the interactive use for the user as now the programmer can decide when to fix a variable which is not yet defined, instead of being forced to do so when accepting a method.
- 02-PhIP-Undeclared-Variables: will improve Undeclared Variables to raise repair actions at runtime (e.g. when running tests interactively), improving the situation even more.
- XX-PhIP-Object-Logger: Object Logging of Compiler exceptions.