The specs no longer output WARNING messages about referencing underscores.
The root issue that caused this was that the VM was almost always setting ENV["MYST_ENV"] = "prod", which would screw up tests that ran later in the pipeline, since they weren't resetting the variable.
Part of this PR is removing MYST_ENV from the interpreter. The same behavior that it was implementing has been possible using interpret_with_mocked_output for quite a while now, so it makes sense to be consistent with it.
In general, using environment variables for configuring the interpreter should be avoided. Instead (especially since the VM is embeddable in any crystal projects), this should be done with flags on the interpreter that can also be set through the CLI. This gives much finer control over execution and isolates instances of the interpreter from the global state of environment variables.
The specs no longer output
WARNING
messages about referencing underscores.The root issue that caused this was that the VM was almost always setting
ENV["MYST_ENV"] = "prod"
, which would screw up tests that ran later in the pipeline, since they weren't resetting the variable.Part of this PR is removing
MYST_ENV
from the interpreter. The same behavior that it was implementing has been possible usinginterpret_with_mocked_output
for quite a while now, so it makes sense to be consistent with it.In general, using environment variables for configuring the interpreter should be avoided. Instead (especially since the VM is embeddable in any crystal projects), this should be done with flags on the interpreter that can also be set through the CLI. This gives much finer control over execution and isolates instances of the interpreter from the global state of environment variables.