Failed to find name hashed for types with `$$`
See original GitHub issueIt works fine with sbt version 1.0.2, but start failing 1.0.3 and greater. I found this commit might be related.
Error message:
[error] java.lang.RuntimeException: Failed to find name hashes for com.twitter.scrooge.serializer.thriftscala.SerializerListTest$$Adapt
[error] at scala.sys.package$.error(package.scala:27)
[error] at sbt.internal.inc.AnalysisCallback.nameHashesForCompanions(Compile.scala:325)
[error] at sbt.internal.inc.AnalysisCallback.analyzeClass(Compile.scala:332)
[error] at sbt.internal.inc.AnalysisCallback.$anonfun$addProductsAndDeps$4(Compile.scala:348)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error] at scala.collection.mutable.HashSet.foreach(HashSet.scala:78)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error] at scala.collection.mutable.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:46)
[error] at scala.collection.SetLike.map(SetLike.scala:101)
[error] at scala.collection.SetLike.map$(SetLike.scala:101)
[error] at scala.collection.mutable.AbstractSet.map(Set.scala:46)
[error] at sbt.internal.inc.AnalysisCallback.$anonfun$addProductsAndDeps$1(Compile.scala:348)
[error] at scala.collection.TraversableOnce.$anonfun$foldLeft$1(TraversableOnce.scala:157)
[error] at scala.collection.TraversableOnce.$anonfun$foldLeft$1$adapted(TraversableOnce.scala:157)
[error] at scala.collection.mutable.HashSet.foreach(HashSet.scala:78)
[error] at scala.collection.TraversableOnce.foldLeft(TraversableOnce.scala:157)
[error] at scala.collection.TraversableOnce.foldLeft$(TraversableOnce.scala:155)
[error] at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104)
[error] at scala.collection.TraversableOnce.$div$colon(TraversableOnce.scala:151)
[error] at scala.collection.TraversableOnce.$div$colon$(TraversableOnce.scala:151)
[error] at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:104)
[error] at sbt.internal.inc.AnalysisCallback.addProductsAndDeps(Compile.scala:344)
[error] at sbt.internal.inc.AnalysisCallback.get(Compile.scala:294)
[error] at sbt.internal.inc.Incremental$.doCompile(Incremental.scala:102)
[error] at sbt.internal.inc.Incremental$.$anonfun$compile$4(Incremental.scala:82)
[error] at sbt.internal.inc.IncrementalCommon.recompileClasses(IncrementalCommon.scala:117)
[error] at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:64)
[error] at sbt.internal.inc.Incremental$.$anonfun$compile$3(Incremental.scala:84)
[error] at sbt.internal.inc.Incremental$.manageClassfiles(Incremental.scala:129)
[error] at sbt.internal.inc.Incremental$.compile(Incremental.scala:75)
[error] at sbt.internal.inc.IncrementalCompile$.apply(Compile.scala:70)
[error] at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:309)
[error] at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:267)
[error] at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:158)
[error] at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:237)
[error] at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:68)
[error] at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:1403)
[error] at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:1385)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error] at sbt.std.Transform$$anon$4.work(System.scala:64)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:266)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] at java.lang.Thread.run(Thread.java:745)
[error] (scrooge-serializer/test:compileIncremental) Failed to find name hashes for com.twitter.scrooge.serializer.thriftscala.SerializerListTest$$Adapt
[error] Total time: 6 s, completed Apr 19, 2018 2:44:17 PM
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Failed to find method for hash - JBoss.org
Hello all, I have issue during deployment my war file under JBoss 5.0.1 on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with...
Read more >Python poetry install failure - invalid hashes - Stack Overflow
There are several issue reports about invalid hashes. One common cause is running multiple Poetry instances simultaneously; ...
Read more >Server names - Nginx.org
If a name is not found, the hash table with wildcard names starting with an asterisk is searched. If the name is not...
Read more >hash - Manual - PHP
Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..). ... In particular, if users type the same passwords, they will still hash...
Read more >The difference between Encryption, Hashing and Salting
Historical encryption algorithms. Let's start by going over some different types of ciphers, then we'll get into the modern algorithms that are used...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was able to work around this by using a different namespacing character in this generated code, so I think we’re unblocked.
It looks like this one might go fairly deep into a rabbit hole. It’s very, very easy to reproduce in a zinc test: I’ve pushed a repro here: https://github.com/sbt/zinc/compare/1.x...stuhood:stuhood/double-dollar .
Take this investigation with a grain of salt, but:
The issue appears to be that nothing ever calls
void api(File sourceFile, xsbti.api.ClassLike classApi);for the class. From what I can tell, what should be calling that method in this case is the analysis callback in the compiler bridge.As far as I can tell, the
TopLevelTraverserinscala.xsbt.APInever observes the class in theTree, and so never callsExtractAPI.extractAllClassesOffor it.I’m going to give up on this one for now, because (if I understand this correctly), that means that either the class is not in the
Tree(…which seems unlikely) or we’re not traversing theTreecorrectly… and someone with more knowledge of the compiler would be able to move more quickly in there. cc @retronym , @jvican