bazelbuild / rules_scala

Scala rules for Bazel
Apache License 2.0
359 stars 266 forks source link

Fix to close the compiler object in scalacinvoker #1545

Closed crt-31 closed 5 months ago

crt-31 commented 5 months ago

Description

This fixes functionality that was accidently broken in PR #1529 (my bad).

The fix is to call close on the compiler within the scalaCWorker (originally added in PR #1504)

crt-31 commented 5 months ago

@simuons

Please fix code formatting.

Done

Also wondering maybe same changes needs to be done in ScalacInvoker3?

I looked at dotty's sourcecode, and they don't have a close() mechanism like Scala2 does yet. There is a PR written up for it https://github.com/lampepfl/dotty/issues/5412.

Suggest we push this PR through, and deal with Scala3 when dotty implements that PR.