eed3si9n / scalaxb

scalaxb is an XML data binding tool for Scala.
http://scalaxb.org/
MIT License
335 stars 154 forks source link

Split fromString method for big enums that would otherwise not compile #517

Closed lhns closed 4 years ago

lhns commented 4 years ago

With big enums the generated fromString methods exceed the allowed method size and won't compile. This PR splits the fromString method into multiple private methods with 500 lines each.

grafik

Th3Falc0n commented 4 years ago

Had the same problem, supporting this fix.

lhns commented 4 years ago

I don't know why the travis builds timed out.

eed3si9n commented 4 years ago

Sorry about the late response. I'm merging this now.

mirelon commented 3 years ago

PartialFunction[Any is causing a compile error when parsing Seq[String]

non-variable type argument String in type pattern Seq[String] (the underlying of Seq[String]) is unchecked since it is eliminated by erasure

scalaxb 1.7.4 is OK scalaxb 1.7.5 is failing

Will try to create a test case.

lhns commented 3 years ago

That is a warning and you have -Werror or -Xfatal-warnings set right? Weird that the compiler doesn't warn about this before the commit.