Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support foundation javac #387

Closed
sormuras opened this issue Jul 10, 2019 · 3 comments
Closed

Support foundation javac #387

sormuras opened this issue Jul 10, 2019 · 3 comments

Comments

@sormuras
Copy link
Contributor

sormuras commented Jul 10, 2019

Is it possible to abstract the underlying compiler to allow usage of provided javac tool?

It would enable supporting new Java syntax (like Text Blocks et al.) out of the box, wouldn't it?

Related issues:

@cushon
Copy link
Collaborator

cushon commented Jul 29, 2019

The implementation uses internal APIs from the jdk.compiler module, not just the public java.compiler ones, so using the implementation from the host JDK would require passing additional flags to disable module access checks. It would also mean the formatter had to support a range of versions of the internal APIs, which is difficult because there can be breaking changes between releases.

Also, this would only solve half of the problem for new language features: having a parser that handles switch expressions and text blocks isn't sufficient, the formatting logic still has to be updated to decide what to do with those constructs.

@eaftan
Copy link
Contributor

eaftan commented Jul 29, 2019

Closing as Infeasible

@cushon
Copy link
Collaborator

cushon commented Mar 16, 2020

After thinking about this more, it may be part of the solution after all. Let's continue the discussion in #436.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants