0

I am having a problem with 2.10.3 and code generated by Slick (Codegen). It seems very similar to

Scalac hanging on phase typer of RegexParser

Other files generated by Codegen work, but this one just hangs forever in "scalac: phase typer Foo.scala"

The only difference I can see is the number of columns in the table resulting in lots of vals and large cons'ed lists like this

def * = WordRootID :: WordID :: WordHeadID :: SynonymID :: PronunciationID :: Rank :: BNCFrequency :: CompassDifficulty :: DifficultyNormalized :: DifficultySourceCode :: COCARank :: PartOfSpeech :: AttributeNounProper :: AttributeNounGerund :: AttributePronounType :: AttributeVerbIrregular :: AttributeAdjectiveParticiple :: AttributeArticleType :: AttributeNumber :: AttributeLanguage :: AttributeIdiom :: AttributeMultiWord :: AttributeExcluded :: AttributePrivate :: en_DefinitionDeprecated :: en_QuizDefinitionDeprecated :: en_SourceDeprecated :: ja_WordDeprecated :: ja_SourceDeprecated :: ja_DifficultyDeprecated :: ko_WordDeprecated :: ko_SourceDeprecated :: zh_WordDeprecated :: zh_SourceDeprecated :: es_WordDeprecated :: es_SourceDeprecated :: pt_WordDeprecated :: pt_SourceDeprecated :: tr_WordDeprecated :: tr_SourceDeprecated :: vi_WordDeprecated :: vi_Source :: ReviewCode :: Active :: DateModified :: DateCreated :: en_QuizDefinitionDateModifiedDeprecated :: WordRootAssetID :: Locked :: AttributeStudiable :: WhiteListingStatus :: HNil

When I comment out most of fields and cut down the lists to something small like this the compiler finishes

def * = WordRootID :: WordID :: WordHeadID :: AttributeLanguage :: HNil 

However, this is hardly an ideal way to code. Any help would be very much appreciated!

Thank you very much Peter

Community
  • 1
  • 1
opus111
  • 2,744
  • 4
  • 25
  • 41
  • There are a number of comments in the Slick documentation regarding the upper limit of 22 fields. Did you read those comments and are they germane to your issue? – Bob Dalgleish Dec 30 '14 at 03:45
  • Try 2.10.4. There have been implicit search performance improvements. – cvogt Dec 30 '14 at 09:38
  • Hi Bob, good thought but the 22 column limit has now gone away. It was due to the limits of tuples, but now for very large tables, Codegen switches from tuples to HLists. http://slick.typesafe.com/doc/2.0.3/code-generation.html – opus111 Dec 30 '14 at 14:05
  • Thanks Cvogt. What's the current state of 2.11? Is it worth going all the way? – opus111 Dec 30 '14 at 14:08
  • Expect some warnings in 2.11, but it is fully supported. – cvogt Jan 09 '15 at 00:26

1 Answers1

1

Thank you Cvogt, upgrading to 2.11 did the trick. As you said, this is a problem with the 2.10.3 compiler and seems to be fixed now.

opus111
  • 2,744
  • 4
  • 25
  • 41