You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2 new experimental options are introduces for the compiler:
`-Ybest-effort` and `-Ywith-best-effort-tasty`. A related
Best Effort TASTy (.betasty) format, a TASTy aligned file format able
to hold some errored trees was also added. Behaviour of the options and
the format is documented as part of this commit in the
`best-effort-compilation.md` docs file.
`-Ybest-effort` is used to produce `.betasty` files in the
`<output>/META-INF/best-effort`. `-Ywith-best-effort-tasty` allows to
use them during compilation, limiting it to the frontend phases if such
file is used. If any .betasty is used, transparent inline macros also
cease to be expanded by the compiler.
Since best-effort compilation can fail (e.g. due to cyclic reference
errors which sometimes are not able to be pickled or unpickled),
the crashes caused by it are wrapped into an additional descriptive
error message in the aim to fail more gracefully (and not pollute our
issue tracker with known problems).
The feature is tested in two ways:
* with a set of pairs of dependent projects, one of which is
meant to produce .betasty by using `-Ybest-effort`, and the other
tries to consume it using `-Ywith-best-effort-tasty`.
* by reusing the compiler nonbootstrapped neg tests, first by running
them with `-Ybest-effort` option, and then by running read-tasty tests
on the produced betasty files to thest best-effort tastt unpickling
Additionally, `-Ywith-best-effort-tasty` allows to print `.betasty` via
`-print-tasty`.
valYprofileRunGcBetweenPhases:Setting[List[String]] =PhasesSetting("-Yprofile-run-gc", "Run a GC between phases - this allows heap size to be accurate at the expense of more time. Specify a list of phases, or *", "_")
valYbestEffort:Setting[Boolean] =BooleanSetting("-Ybest-effort", "Enable best-effort compilation attempting to produce betasty to the META-INF/best-effort directory, regardless of errors, as part of the pickler phase.")
410
+
valYwithBestEffortTasty:Setting[Boolean] =BooleanSetting("-Ywith-best-effort-tasty", "Allow to compile using best-effort tasty files. If such file is used, the compiler will stop after the pickler phase.")
valYexplicitNulls:Setting[Boolean] =BooleanSetting("-Yexplicit-nulls", "Make reference types non-nullable. Nullable types can be expressed with unions: e.g. String|Null.")
0 commit comments