Unnecessary full compilations are performed when synchronizing BSP projects #1497
atty303
started this conversation in
Development
Replies: 1 comment
-
I've come with a solution for the compilation problem in pull request: #1536 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When the BSP's
buildTargetScalacOptions
is requested, the following code will be executed.mill/bsp/src/mill/bsp/MillBuildServer.scala
Lines 448 to 450 in 5266b79
The
compileClasspath
target depends on thelocalClasspath
target.mill/scalalib/src/JavaModule.scala
Lines 269 to 275 in 5266b79
Since the
localClasspath
target depends on thecompile
target, the compilation of all modules will be executed.For BSP synchronization, I think it is enough to get the
dest
of thecompile
target, and there is no need to actually compile it.I came up with the following potential fixes.
dest
of thecompile
target from thelocalClasspath
target. (Seems impossible).compileClasspath
from the BSP separately, and do not evaluate thecompile
. However, this cannot handle the case wherecompileClasspath
is customized.Does anyone have any ideas?
Beta Was this translation helpful? Give feedback.
All reactions