The compiler removed some logic that was reopening the source file based on Location.input_name and instead only rely on Location.input_lexbuf for source quotation.
This PR first adds a test that rely on source quotation. Our test suite failed to catch this bug because all our tests use OCAML_ERROR_STYLE=short.
It then changes the way we read source files to stick to what the compiler does in Pparse while preserving our features such read from stdin. We now set the input_lexbuf properly.
The compiler removed some logic that was reopening the source file based on
Location.input_name
and instead only rely onLocation.input_lexbuf
for source quotation.This PR first adds a test that rely on source quotation. Our test suite failed to catch this bug because all our tests use
OCAML_ERROR_STYLE=short
. It then changes the way we read source files to stick to what the compiler does inPparse
while preserving our features such read from stdin. We now set the input_lexbuf properly.