Page MenuHomePhabricator

CachingParser::checkSyntax should only try to build the AST without evaluating it
Open, Needs TriagePublic


I've been having this idea for a while, and already implemented some code to help with that. Not evaluating the AST means avoiding to deal with unavailable variables etc., although there shouldn't be a sensible difference runtime-wise.
The acceptance criterion here is that we should be able to report more errors at syntax-check time. Some kinds of errors will be hard to report there, e.g. if a variable is of the right type, so we may end up declining this task. Or alternatively, have a dedicated wiki page for runtime errors (T193064 / r429381). However, I still believe it's worth investigating. To make things easier, this should be done after enabling CachingParser in production, and inverting the inheritance between the old and the new parser (or even deleting the old one).