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
First step to pipelining support - enable reading Java symbols from TASTy (#19074)
This PR contains the minimal forward incompatible changes of pipelining
- reading Java and outline symbols from TASTy.
The other changes to implement pipelining have no impact on TASTy or the
standard library - so can come in a patch release.
To test reading TASTy produced from Java defined classes, we add two
private flags `-Yjava-tasty` and `-Yjava-tasty-output`, which are not
expected to be used by any build tool. The tests allow us to write just
the java signatures to TASTy, package them in a jar, and then read the
Java TASTy from the classpath.
- Keep Java compilation units up to Pickler phase if `-Yjava-tasty` is
set. Skip phases for Java when not needed.
- Add `JAVAattr` and `OUTLINEattr` TASTy attributes, `ELIDED` tree tag.
`ELIDED` trees are pickled as rhs of java term definitions. `ELIDED`
trees can only be unpickled if `OUTLINEattr` is present.
- Java units will set the `JAVAattr` TASTy attribute. As currently we
outline parse Java files we also set the `OUTLINEattr`.
- In the future we might expand `OUTLINEattr` to include outline Scala
typing.
- `OUTLINEattr` and `JAVAattr` do not need any special flags to _read_
from the classpath, however to read outline tasty in the `-from-tasty`
mode (so `tasty-inspector` and `scaladoc` are included) we do require an
explicit `-Yallow-outline-from-tasty`, as method bodies are required for
full functionality.
- write java tasty files to a special jar, set with
`-Yjava-tasty-output`
this option is for testing purposes only.
Fix sealedDescendants method for Java Enums.
- Rename `JavaEnumTrait` flags to `JavaEnum` (reflecting the actual
flags set)
- test java enum in `SealedDescendantsTest`
fixes#15908
valYforceInlineWhileTyping:Setting[Boolean] =BooleanSetting("-Yforce-inline-while-typing", "Make non-transparent inline methods inline when typing. Emulates the old inlining behavior of 3.0.0-M3.")
434
434
435
435
valYdebugMacros:Setting[Boolean] =BooleanSetting("-Ydebug-macros", "Show debug info when quote pattern match fails")
436
+
437
+
// Pipeline compilation options
438
+
valYjavaTasty:Setting[Boolean] =BooleanSetting("-Yjava-tasty", "Pickler phase should compute pickles for .java defined symbols for use by build tools")
439
+
valYjavaTastyOutput:Setting[AbstractFile] =OutputSetting("-Yjava-tasty-output", "directory|jar", "(Internal use only!) destination for generated .tasty files containing Java type signatures.", NoAbstractFile)
440
+
valYallowOutlineFromTasty:Setting[Boolean] =BooleanSetting("-Yallow-outline-from-tasty", "Allow outline TASTy to be loaded with the -from-tasty option.")
0 commit comments