Now that the Python DSL is gone, must line number hiding is
counter-productive: Python line numbers are not expected to show up in
test outputs in the general case, and hiding them hindes debugging when
there is a Python crash in a testcase. Rework the corresponding output
refiners so that this is done only when actually needed.
Transition all relevant testcases to it. In the process, port
docstrings/comments from test.py files to expected_concrete_syntax.lkt
(now test.lkt) sources and fix stylechecks issues there.
That'll allow us to go from (thin_symbol, sym_table) to symbol, and vice
versa, where with the old representation there was no other way to go
from symbol to thin than redoing a full-lookup.
That'll help us transition to thin-symbol storage everywhere.
Merge the @external, @uses_envs and @uses_entity_info annotations into a
single one: @external(uses_envs=true, uses_entity_info=true). This makes
sense, as uses_envs and uses_entity_info are never legal for
non-external properties.
Add flushing close to places that deal with exceptions so that the order
of lines in the output reflect the order of execution for the
corresponding print statements.
The actual buffering behavior differs depending on the Python
interpreter version used, which led to spurious diffs with older
versions.
TN: W306-034
Depending on the Python interpreter version that is used to exercise
generated libraries, the line number, and thus the quoted line of source
code that is present in baselines can vary. Introduce an output refiner
to hide these discrepancies and use them in tests where it is relevant.
TN: W306-034
Since the analysis context initialization may trigger events (e.g.
"prelude file parsed"), language bindings (in particular Python) may
need to create/register their wrapper around the context that is just
created so that they can use that wrapper when invoking the callback.
Having allocation and initialization as a single atomic step makes this
impossible: this change splits them in the C API and update the
Python/OCaml bindings to allow this.
TN: VA12-016