eed3si9n/scalaxb — Issue #146: Generated xmlprotocol.scala ends up being 65KLOC, Scala compiler can't handle it
Author: devinus
Created: 2012-02-28 18:45:38+00:00
State: open

Unfortunately, I have to start by saying that much to my chagrin I cannot give an example of the WSDL and accompanying XSD files that generates the 65KLOC xmlprotocol.scala, as it's proprietary and I'm bound by non-disclosure agreements between my company and the provider.

However, I can give as much detail and my own observations:

The file I'm sure is clean Scala code and would probably eventually compile given enough time and memory made available to the sbt process. However, my machine only has 4g. At first I was receiving errors during compiling that forced me to use -Xmx2g to make more heap space available, then I was receiving errors about the process not having enough memory per stack, so I increased the stack size to -Xss1m as well. Still, the file would take too long to compile.

Also, a quick search turns up that the file contains about 3k instances of the `implicit` keyword.

I was just wondering if there was a way to split up the XMLProtocol trait into logically smaller pieces. Is there any way to split a trait up amongst multiple files?