-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
build.sc exceeds JVM code size limits #508
Comments
Geez must be a pretty big Mill build! Could you try http://ammonite.io/#CompilerFlags You just need to put it in another Not sure if this will solve your issue, but worth a shot |
Thanks for the quick response! Sadly this does not resolve the issue:
I've added this to the interp.configureCompiler(_.settings.Ydelambdafy.tryToSetColon(List("inline"))) |
Is it a different exception than before? Might still be progress even if it still doesn't work! Now we just need to break up |
That's true indeed. I did try a couple of times and now it's always |
The "big" code for Maybe you could try chunking that big list of things into sub-lists of fixed size, and put some immediately-executing lambdas |
there are probably other ways that code can be optimized to not generate so much stuff, but wrapping stuff in lambdas would be a nice short-term workaround and let us see if there are any other problems elsewhere |
I am not sure if my scala macro skills are solid enough to fix this one by myself ;-) However I was able to come up with a minimal reproducible example (simply put in an empty directory): // build.sc
import $file.conf
import mill._, scalalib._
trait TModule extends SbtModule {
def scalaVersion = "2.12.7"
}
object foo extends Module {
object common extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq(foo.common.one)
}
object three extends TModule {
def moduleDeps = Seq(foo.common.two)
}
}
object domain extends Module {
object one extends TModule {
def moduleDeps = Seq(foo.common.one)
}
object two extends TModule {
def moduleDeps = Seq(foo.domain.one)
}
object three extends TModule {
def moduleDeps = Seq(foo.domain.two)
}
}
object server extends Module {
object one extends TModule {
def moduleDeps = Seq(foo.domain.three)
}
object two extends TModule {
def moduleDeps = Seq(foo.server.one)
}
object three extends TModule {
def moduleDeps = Seq(foo.server.two)
}
}
}
object bar extends Module {
object common extends Module {
object one extends TModule {
def moduleDeps = Seq(foo.common.three)
}
object two extends TModule {
def moduleDeps = Seq(bar.common.one)
}
object three extends TModule {
def moduleDeps = Seq(bar.common.two)
}
}
object domain extends Module {
object one extends TModule {
def moduleDeps = Seq(foo.domain.three)
}
object two extends TModule {
def moduleDeps = Seq(bar.domain.one)
}
object three extends TModule {
def moduleDeps = Seq(bar.domain.two)
}
}
object server extends Module {
object one extends TModule {
def moduleDeps = Seq(foo.server.one)
}
object two extends TModule {
def moduleDeps = Seq(bar.server.one)
}
object three extends TModule {
def moduleDeps = Seq(bar.server.two)
}
}
}
object ham extends Module {
object common extends Module {
object one extends TModule {
def moduleDeps = Seq(bar.common.one)
}
object two extends TModule {
def moduleDeps = Seq(bar.common.two)
}
object three extends TModule {
def moduleDeps = Seq(bar.common.three)
}
}
object domain extends Module {
object one extends TModule {
def moduleDeps = Seq(bar.domain.three)
}
object two extends TModule {
def moduleDeps = Seq(bar.domain.two, ham.common.three)
}
object three extends TModule {
def moduleDeps = Seq(bar.domain.two)
}
}
object server extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
}
object eggs extends Module {
object common extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object domain extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object server extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
}
object salt extends Module {
object common extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object domain extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object server extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
}
object pepper extends Module {
object common extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object domain extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object server extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
}
object oregano extends Module {
object common extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object domain extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object server extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
}
object rosmarin extends Module {
object common extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object domain extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
object server extends Module {
object one extends TModule {
def moduleDeps = Seq()
}
object two extends TModule {
def moduleDeps = Seq()
}
object three extends TModule {
def moduleDeps = Seq()
}
}
} |
Hi,
I just tried to migrate a rather large SBT project to
mill
. The experience is great so far! However I do run into problems now that I am about to add all project's modules (approx 100 modules).I tried to move some methods and stuff around but now I cannot continue without running into errors like these:
As you can see the method names do vary.
I will try to come up with a reproducible example but for now I can say the modules are at max 3 levels deep and are basically plain
SbtModule
instances:Cheers
Gregor
The text was updated successfully, but these errors were encountered: