Description
We encountered a scala 3 binary reproducibility problem in Pekko (apache/pekko-http#566, apache/pekko-connectors#739): on a clean compile, FcmOption.tasty
seems to have references to FcmJsonSupport
, but it does not seem to be deterministic what @Child
annotation position id those references point to.
When compiling FcmOption
in isolation, the references to FcmJsonSupport
do not appear in the .tasty
file at all, which begs the question whether they should be created at all.
Compiler version
3.3.3
(3.4.2 also generated the suspicious references, but we haven't tested yet whether they are deterministic there)
Minimized code
I have a fairly minimized project showing the surprising references to FcmJsonSupport at https://codeberg.org/raboof/scala3-reproduce-21154
Output
source paths:
0: 19 [FcmOption.scala]
69: 27 [FcmJsonSupport.scala]
Expectation
Maybe no reference to FcmJsonSupport
at all, or at least deterministic ones.
It seems like, when (e.g.) FcmOptions
is encountered in FcmJsonSupport
, the Child
annotation linking FcmOptions
and FcmOption
is already created, but still with the Context
of FcmJsonSupport
- though neither FcmOptions
nor FcmOption
are in that file. It seems at some point the context should be updated, though I'm not familiar enough with the code to make a good suggestion where exactly :)