I get the following error when starting sbt when two special sbt plugins are added together to the project in its build definition. One of these plugins is sbt scalikejdbc , and the other is my own , and, obviously, their mutual inclusion in the definition of building a project leads to this error when starting sbt:
scala.reflect.internal.Types $ TypeError: package macros contain an object and a package with the same name: blackbox
It is clear that each plugin displays a different version of scala.reflect.macros , thereby causing this error. I can poke jars of sbt plugins into the jar, and, indeed, one of them may appear with scala/reflect/macros/blackbox.class -
$ jar -tvf scalikejdbc-core_2.10 / jars / scalikejdbc-core_2.10-2.4.2.jar | grep black
0 Sat Jun 11 15:51:10 IDT 2016 scala / reflection / macros / black box /
405 Sat Jun 11 15:51:04 IDT 2016 scala / reflect / macros / blackbox / package $ .class
419 Sat Jun 11 15:51:04 IDT 2016 scala / reflect / macros / blackbox / package.class
- however, it is difficult to positively conclude that sbt is loaded at this early stage of launch in order to understand which versions of this package are involved here and which dependencies bring them.
Thanks for your suggestions on how to continue your research!
And just for the sake of completeness - I include below the complete error given only by sbt below, but I sincerely doubt that it adds any information, so you can ignore it.
scala.reflect.internal.Types $ TypeError: package macros contain an object and a package with the same name: blackbox one of them must be removed from the class in scala.tools.nsc.symtab.SymbolLoaders.enterPackage (SymbolLoaders.scala: 66) in scala.tools.nsc.symtab.SymbolLoaders $ PackageLoader $$ anonfun $ doComplete $ 4.apply (SymbolLoaders.scala: 244) in scala.tools.nsc.symtab.SymbolLoaders $ PackageLoader $$ anonfun $ doComplete $ 4.apply (SymbolLosc. : 243) in scala.collection.Iterator $ class.foreach (Iterator.scala: 727) in scala.collection.AbstractIterator.foreach (Iterator.scala: 1157) in scala.collection.IterableLike $ class.foreach (IterableLike.scala: 72) in scala.collection.AbstractIterable.foreach (Iterable.scala: 54) in scala.tools.nsc.symtab.SymbolLoaders $ PackageLoader.doComplete (SymbolLoaders.scala: 243) in scala.tools.nsc.symtab.SymbolLoaders $ SymbolLoader .complete (SymbolLoade rs.scala: 194) at scala.reflect.internal.Symbols $ Symbol.info (Symbols.scala: 1231) at scala.reflect.internal.pickling.UnPickler $ Scan.scala $ reflects $ internal $ pickling $ UnPickler $ Scan $ $ fromName $ 1 (UnPickler.scala: 207) at scala.reflect.internal.pickling.UnPickler $ Scan.readExtSymbol $ 1 (UnPickler.scala: 226) at scala.reflect.internal.pickling.UnPickler $ Scan.readSymbol (UnPickler.scala : 250) at scala.reflect.internal.pickling.UnPickler $ Scan.readSymbolRef (UnPickler.scala: 783) in scala.reflect.internal.pickling.UnPickler $ Scan.readType (UnPickler.scala: 335) at scala.reflect. internal.pickling.UnPickler $ Scan $$ anonfun $ readTypeRef $ 1.apply (UnPickler.scala: 792) at scala.reflect.internal.pickling.UnPickler $ Scan $$ anonfun $ readTypeRef $ 1.apply (UnPickler.scala: 792) at scala.reflect.internal.pickling.UnPickler $ Scan.at (UnPickler.scala: 171) at scala.reflect.internal.pickling.UnPickler $ Scan.readTypeRef (UnPickler.scala: 792) at sca la.reflect.internal.pickling.UnPickler $ Scan.readType (UnPickler.scala: 345) at scala.reflect.internal.pickling.UnPickler $ Scan $$ anonfun $ readTypeRef $ 1.apply (UnPickler.scala: 792) at scala. reflect.internal.pickling.UnPickler $ Scan $$ anonfun $ readTypeRef $ 1.apply (UnPickler.scala: 792) at scala.reflect.internal.pickling.UnPickler $ Scan.at (UnPickler.scala: 171) at scala.reflect. internal.pickling.UnPickler $ Scan.readTypeRef (UnPickler.scala: 792) at scala.reflect.internal.pickling.UnPickler $ Scan.readAnnotationInfo (UnPickler.scala: 466) at scala.reflect.internal.pickling.UnPickler $ Scan. readSymbolAnnotation (UnPickler.scala: 491) at scala.reflect.internal.pickling.UnPickler $ Scan.run (UnPickler.scala: 88) on scala.reflect.internal.pickling.UnPickler.unpickle (UnPickler.scala: 37) at scala .tools.nsc.symtab.classfile.ClassfileParser.scala $ tools $ nsc $ symtab $ classfile $ ClassfileParser $$ parseAttribute $ 1 (ClassfileParser.scala: 908) in scala.tools.n sc.symtab.classfile.ClassfileParser.parseAttributes (ClassfileParser.scala: 1084) in scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass (ClassfileParser.scala: 580) in scala.tools.classff.tass.sassfs.fass.classfs.classfs.classfs.classfs.classfs.classfs.class parse (ClassfileParser.scala: 88) in scala.tools.nsc.symtab.SymbolLoaders $ ClassfileLoader.doComplete (SymbolLoaders.scala: 261) in scala.tools.nsc.symtab.SymbolLoaders $ SymbolLoader.complete (SymbolLoaders.scala: 194) in scala.reflect.internal.Symbols $ Symbol.info (Symbols.scala: 1231) in scala.reflect.internal.SymbolTable.openPackageModule (SymbolTable.scala: 244) in scala.reflect.internal.SymbolTable.openPackageModule (SymbolTable.scala : 300) in scala.tools.nsc.symtab.SymbolLoaders $ PackageLoader.doComplete (SymbolLoaders.scala: 247) in scala.tools.nsc.symtab.SymbolLoaders $ SymbolLoader.complete (SymbolLoaders.scala: 194) in scala.tools. nsc.symtab.SymbolLoaders $ SymbolLoader.load (SymbolLoaders.scala: 210) in scala.reflect.inter nal.Symbols $ Symbol.typeParams (Symbols.scala: 1489) at scala.reflect.internal.Types $ class.scala $ reflects $ internal $ Types $$ isRawIfWithoutArgs (Types.scala: 4394) in scala.reflect.internal.Types $$ anon $ 11.apply (Types.scala: 4416) at scala.reflect.internal.Symbols $ TermSymbol.scala $ reflects $ internal $ Symbols $ TermSymbol $$ cook $ 1 (Symbols.scala: 2581) in scala.reflect.internal .Symbols $ TermSymbol.doCookJavaRawInfo (Symbols.scala: 2589) at scala.reflect.internal.Symbols $ Symbol.cookJavaRawInfo (Symbols.scala: 1442) in scala.tools.nsc.typechecker.Infer $ Inferencer.checkAccessible (Infer. : 384) in scala.tools.nsc.typechecker.Typers $ Typer.scala $ tools $ nsc $ typechecker $ Typers $ Typer $$ makeAccessible (Typers.scala: 605) in scala.tools.nsc.typechecker.Typers $ Typer. typedIdent $ 2 (Typers.scala: 5201) at scala.tools.nsc.typechecker.Typers $ Typer.typedIdentOrWildcard $ 1 (Typers.scala: 5218) at scala.tools.nsc.typechec ker.Typers $ Typer.typed1 (Typers.scala: 5561) at scala.tools.nsc.typechecker.Typers $ Typer.typed (Typers.scala: 5642) at scala.tools.nsc.typechecker.Typers $ Typer.typedQualifier ( Typers.scala: 5727) in scala.tools.nsc.typechecker.Typers $ Typer.typedQualifier (Typers.scala: 5735) in scala.tools.nsc.typechecker.Namers $ Namer.importSig (Namers.scala: 1357) in scala .tools.nsc.typechecker.Namers $ Namer.getSig $ 1 (Namers.scala: 1460) at scala.tools.nsc.typechecker.Namers $ Namer.typeSig (Namers.scala: 1463) at scala.tools.nsc.typechecker. Namers $ Namer $$ anonfun $ monoTypeCompleter $ 1 $$ anonfun $ apply $ 1.apply $ mcV $ sp (Namers.scala: 728) at scala.tools.nsc.typechecker.Namers $ Namer $$ anonfun $ monoTypeCompleter $ 1 $$ anonfun $ apply $ 1.apply (Namers.scala: 727) at scala.tools.nsc.typechecker.Namers $ Namer $$ anonfun $ monoTypeCompleter $ 1 $$ anonfun $ apply $ 1.apply (Namers.scala: 727) in scala.tools.nsc .typechecker.Namers $ Namer.scala $ tools $ nsc $ typechecker $ Namers $ Namer $$ logAndValidate (Namers.scala: 1496) in scala.tools.nsc.typechecker.Namers $ Namer $$ anonfun $ monoTypeCompleter $ 1.apply (Namers.scala: 727) in scala.tools.nsc.typechecker.Namers $ Namer $$ anonfun $ monoTypeCompleter $ 1.apply (Namers.scala: 726) at scala.tools.nsc.typechecker.Namers $$ anon $ 1.completeImpl (Namers.scala: 1611) at scala.tools.nsc.typechecker.Namers $ LockingTypeCompleter $ class.complete (Namers.scala: 1619) in scala.tools.nsc.typechecker.Namers $$ anon $ 1.complete (Namers.scala: 1609) in scala.reflect.internal.Symbols $ Symbol.info (Symbols .scala: 1231) in scala.reflect.internal.Symbols $ Symbol.initialize (Symbols.scala: 1374) in scala.tools.nsc.typechecker.Typers $ Typer.scala $ tools $ nsc $ typechecker $ Typers $ Typer $$ typedStat $ 1 (Typers.scala: 2912) at scala.tools.nsc.typechecker.Typers $ Typer $$ anonfun $ 61.apply (Typers.scala: 3032) at scala.tools.nsc.typechecker.Typers $ Typer $$ anonfun $ 61 .apply (Typers.scala: 3032) at scala.collection.immutable.List.loop $ 1 (List.scala: 170) in scala.collection.immutable.List.mapConserve (List.scala: 186) in scala.tools.nsc.typechecker.Typers $ Typer.typedStats ( Typers.scala: 3032) in scala.tools.nsc.typechecker.Typers $ Typer.typedPackageDef $ 1 (Typers.scala: 5301) in scala.tools.nsc.typechecker.Typers $ Typer.typed1 (Typers.scala: 5587) in scala.tools.nsc.typechecker.Typers $ Typer.typed (Typers.scala: 5642) at scala.tools.nsc.typechecker.Typers $ Typer.typed (Typers.scala: 5704) at scala.tools.nsc.typechecker. Analyzer $ typerFactory $$ anon $ 3.apply (Analyzer.scala: 99) at scala.tools.nsc.Global $ GlobalPhase.applyPhase (Global.scala: 464) at scala.tools.nsc.typechecker.Analyzer $ typerFactory $$ anon $ 3 $$ anonfun $ run $ 1.apply (Analyzer.scala: 91) at scala.tools.nsc.typechecker.Analyzer $ typerFactory $$ anon $ 3 $$ anonfun $ run $ 1.apply (Analyzer.scala: 91) in scala. collection.Iterator $ class.foreach (Iterator.scala: 727) in sc ala.collection.AbstractIterator.foreach (Iterator.scala: 1157) at scala.tools.nsc.typechecker.Analyzer $ typerFactory $$ anon $ 3.run (Analyzer.scala: 91) on sbt.compiler.Eval $$ anonfun $ compile $ 1 $ 1.apply $ mcV $ sp (Eval.scala: 177) at sbt.compiler.Eval $$ anonfun $ compile $ 1 $ 1.apply (Eval.scala: 177) at sbt.compiler.Eval $$ anonfun $ compile $ 1 $ 1 .apply (Eval.scala: 177) on scala.reflect.internal.SymbolTable.atPhase (SymbolTable.scala: 207) on sbt.compiler.Eval.compile $ 1 (Eval.scala: 177) on sbt.compiler.Eval.compileAndLoad (Eval.scala: 182) at sbt.compiler.Eval.evalCommon (Eval.scala: 152) at sbt.compiler.Eval.evalDefinitions (Eval.scala: 122) at sbt.EvaluateConfigurations $ .evaluateDefinitions (EvaluateConfigurations.scala: ) on sbt.EvaluateConfigurations $ .evaluateSbtFile (EvaluateConfigurations.scala: 109) at sbt.Load $ .sbt $ Download $$ loadSettingsFile $ 1 (Load.scala: 725) at sbt.Load $$ anonfun $ sbt $ Zagru $$ memoLoadSettingsFile $ 1 $ 1.apply (Load.scala: 731) at sbt.Load $$ anonfun $ sbt $ Download $$ memoLoadSettingsFile $ 1 $ 1.apply (Load.scala: 730) in scala.collection.MapLike $ class.getOrElse (MapLike.scala: 128) at scala.collection.AbstractMap.getOrElse (Map.scala: 58) at sbt. Load $ .sbt $ Load $$ memoLoadSettingsFile $ 1 (Load.scala: 730) at sbt.Load $$ anonfun $ loadFiles $ 1 $ 2.apply (Load.scala: 738) at sbt.Load $$ anonfun $ loadFiles $ 1 $ 2.apply (Load.scala: 738) in scala.collection.TraversableLike $$ anonfun $ map $ 1.apply (TraversableLike.scala : 244) in scala.collection.TraversableLike $$ anonfun $ map $ 1.apply (TraversableLike.scala: 244) in scala.collection.mutable.ResizableArray $ class.foreach (ResizableArray.scala: 59) in scala.collection.mutable. ArrayBuffer.foreach (ArrayBuffer.scala: 47) in scala.collection.TraversableLike $ class.map (TraversableLike.scala: 244) in scala.collection.AbstractTraversable.map (Travers able.scala: 105) at sbt.Load $ .loadFiles $ 1 (Load.scala: 738) at sbt.Load $ .discoverProjects (Load.scala: 749) at sbt.Load $ .discover $ 1 (Load.scala: 555) at sbt.Load $ .loadTransitive (Load.scala: 584) at sbt.Load $ .loadProjects $ 1 (Load.scala: 452) at sbt.Load $ .loadUnit (Load.scala: 456) at sbt.Load $$ anonfun $ 18 $$ anonfun $ apply $ 11.apply (Load.scala: 291) at sbt.Load $$ anonfun $ 18 $$ anonfun $ apply $ 11.apply (Load.scala: 291) at sbt.BuildLoader $$ anonfun $ componentLoader $ 1 $ $ anonfun $ apply $ 4 $$ anonfun $ apply $ 5 $$ anonfun $ apply $ 6.apply (BuildLoader.scala: 91) at sbt.BuildLoader $$ anonfun $ componentLoader $ 1 $$ anonfun $ apply $ 4 $$ anonfun $ apply $ 5 $$ anonfun $ apply $ 6.apply (BuildLoader.scala: 90) at sbt.BuildLoader.apply (BuildLoader.scala: 140) at sbt.Load $ .loadAll (Load.scala: 344) at sbt.Load $ .loadURI (Load. scala: 299) at sbt.Load $ .load (Load.scala: 295) at sbt.Load $ .load (Load.scala: 286) at sbt.Load $ .apply (L oad.scala: 140) at sbt.Load $ .defaultLoad (Load.scala: 36) at sbt.BuiltinCommands $ .liftedTree1 $ 1 (Main.scala: 492) at sbt.BuiltinCommands $ .doLoadProject (Main.scala: 492) at sbt.BuiltinCommands $$ anonfun $ loadProjectImpl $ 2.apply (Main.scala: 484) at sbt.BuiltinCommands $$ anonfun $ loadProjectImpl $ 2.apply (Main.scala: 484) at sbt.Command $$ anonfun $ applyEffect $ 1 $$ anonf $ apply $ 2.apply (Command.scala: 59) at sbt.Command $$ anonfun $ applyEffect $ 1 $$ anonfun $ apply $ 2.apply (Command.scala: 59) at sbt.Command $$ anonfun $ applyEffect $ 2 $$ anonfun $ apply $ 3.apply (Command.scala: 61) at sbt.Command $$ anonfun $ applyEffect $ 2 $$ anonfun $ apply $ 3.apply (Command.scala: 61) in sbt.Command $ .process (Command.scala: 93 ) at sbt.MainLoop $$ anonfun $ 1 $$ anonfun $ apply $ 1.apply (MainLoop.scala: 96) at sbt.MainLoop $$ anonfun $ 1 $$ anonfun $ apply $ 1.apply (MainLoop.scala: 96) on sbt. State $$ anon $ 1.process (State.scala: 184) on sbt.MainLoo p $$ anonfun $ 1.apply (MainLoop.scala: 96) at sbt.MainLoop $$ anonfun $ 1.apply (MainLoop.scala: 96) at sbt.ErrorHandling $ .wideConvert (ErrorHandling.scala: 17) on sbt.MainLoop $ .next (MainLoop.scala: 96) on sbt.MainLoop $ .run (MainLoop.scala: 89) at sbt.MainLoop $$ anonfun $ runWithNewLog $ 1.apply (MainLoop.scala: 68) at sbt.MainLoop $$ anonfun $ runWithNewLog $ 1.apply (MainLoop.scala: 63) at sbt.Using.apply (Using.scala: 24) at sbt.MainLoop $ .runWithNewLog (MainLoop.scala: 63) at sbt.MainLoop $ .runAndClearLast (MainLoop. 46) at sbt.MainLoop $ .runLoggedLoop (MainLoop.scala: 30) on sbt.MainLoop $ .runLogged (MainLoop.scala: 22) on sbt.StandardMain $ .runManaged (Main.scala: 54) on sbt.xMain.run (Main.scala: 29) in xsbt.boot.Launch $$ anonfun $ run $ 1.apply (Launch.scala: 109) in xsbt.boot.Launch $ .withContextLoader (Launch.scala: 128) in xsbt.boot.Launch $ .run (Launch.scala: 109) on xsbt.boot.Launch $$ anonfun $ at Change $ 1.apply (Launch.scala: 35) to xsbt.boot.Launch $ .launch (Launch.scala: 117) to xsbt.boot.Launch $ .apply (Launch.scala: 18) to xsbt.boot.Boot $ .runImpl (Boot.scala: 41) in xsbt.boot.Boot $ .main (Boot.scala: 17) in xsbt.boot.Boot.main (Boot.scala) error: error loading package, class file '/ home /user/.sbt/boot/scala-2.10.6/org.scala-sbt/sbt/0.13.11/sbt-0.13.11.jar(sbt/package.class) 'violated (class java.lang.RuntimeException / error reading Scala signature package.class: package macros contain an object and a package with the same name: blackbox one of them must be removed from the classpath) sbt.compiler.EvalException: Type an error in the expression
scala scala-macros sbt sbt-plugin scalikejdbc
matanster
source share