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

Mixed-Mode compilation - Compile Java and Kotlin in one pass in the worker. #3

Closed
2 tasks done
hsyed opened this issue Jan 31, 2018 · 1 comment
Closed
2 tasks done
Assignees
Labels

Comments

@hsyed
Copy link
Contributor

hsyed commented Jan 31, 2018

The rules should be able to compile Java and Kotlin files in a single pass. Support has already been added, it needs to be further tested and refined. A lot of the work done for this is needed for annotation processing / kapt support.

Notes on implementation:

  • Java compilation only occurs when there is a Java source file present.

RFC:

* Workers creates a temp directory and compiles to that -- Is this ok to do ?

Todo:

  • Java compiler used by Kotlins prints out a pointless 1 java file compiled to to the console -- need to silence this without silencing anything else.
  • Verify warning and error reporting, the warnings and errors need to get to intellij / the console.
  • [ ] Mirror the compilation switches and classpath setup that is in use by the Java rules -- As far as Java compilation goes we should have same experience -- Whatever Linting is configured for Java core, it should work when Kotlin is compiling Java -- Could use help on this one as it will remain a bit low on my list of priorities. unrealistic
@hsyed hsyed added the type: enhancement New feature or request label Jan 31, 2018
@hsyed hsyed self-assigned this Jan 31, 2018
@hsyed
Copy link
Contributor Author

hsyed commented Feb 1, 2018

The correct approach to mixed mode is to compile in 2 phases. Unless something has changed in recent releases. Kotlinc only compiles java sources that it has analysed. I think it makes sense to just leave all java compilation to javac.

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

No branches or pull requests

1 participant