pekko-http icon indicating copy to clipboard operation
pekko-http copied to clipboard

reproducible builds: scala 3 tasty differences in pekko-http-core `HttpEntity.tasty`

Open raboof opened this issue 1 year ago • 4 comments

aside https://github.com/lampepfl/dotty/issues/17330 , I'm seeing differences in the tasty segments of Scala 3 artifacts.

HttpEntity.tasty seems to refer to different source paths:

 source paths:
         0: http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/HttpEntity.scala
      2063: http-core/target/scala-3.3.1/src_managed/HttpMessage.scala

vs

 source paths:
         0: http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/HttpEntity.scala
      2063: http-core/src/main/scala/org/apache/pekko/http/impl/engine/parsing/ParserOutput.scala

It's not clear to me whether/how those source paths are used.

raboof avatar Feb 09 '24 09:02 raboof

possibly related to https://github.com/lampepfl/dotty/blob/main/compiler/src/dotty/tools/dotc/config/OutputDirs.scala#L96

raboof avatar Feb 09 '24 09:02 raboof

Some findings:

  • I'm still seeing this behavior with Scala 3.4.1-RC1-bin-20240208-7bcfce2-NIGHTLY
  • It seems to sometimes think (some code related to) ResponseEntity is defined in ParserOutput for some reason?
  • I haven't caught it to see what it thinks is defined in HttpMessage.scala - but if that's about ResponseEntity as well, that'd also be wrong, as ResponseEntity is defined in HttpEntity.scala.

raboof avatar Feb 10 '24 13:02 raboof

The HttpMessage.scala reference is also somehow related to ResponseEntity. I've been prodding at this with a simplified build in a throwaway branch at https://github.com/raboof/incubator-pekko-http/tree/reproduce-tasty

raboof avatar Feb 13 '24 08:02 raboof

Looks like this should be fixed in 3.3.5 with https://github.com/scala/scala3/issues/21154

possibly causing what we've seen in the 1.1.0 release at https://arnout.engelen.eu/reproducible-builds-diffoscope-output-pekko-http-core_3-1.1.0.jar/

raboof avatar Oct 01 '24 10:10 raboof