To determine if a class has API change TraitPrivateMembersModified, extraHash, which is a hash of private API of a trait is computed. Direct comparison on extraHash is used to determine if a trait has private member modified.
When we have the following dependency c.C -> b.B -> a.A, (c.C extends b.B, b.B extends a.A), for which c.C, b.B, a.A belongs to different projects, the dependencies are external, hence when A has private member modified, the following happens
A is recompiled
B is recompiled since API of A has change TraitPrivateMembersModified and B extends A.
API of B is not changed, hence C is not recompiled even though C extends B.
Fix
When we compute extraHash for a child trait, use the parent traits' extraHash. Therefore, when parent has private members modified, child extraHash would change, hence child would have TraitPrivateMembersModified, propagating it.
This PR fixes #662
Cause of the issue
To determine if a class has API change
TraitPrivateMembersModified
,extraHash
, which is a hash of private API of a trait is computed. Direct comparison onextraHash
is used to determine if a trait has private member modified.When we have the following dependency
c.C -> b.B -> a.A
, (c.C
extendsb.B
,b.B
extendsa.A
), for whichc.C, b.B, a.A
belongs to different projects, the dependencies are external, hence whenA
has private member modified, the following happensA
is recompiledB
is recompiled since API ofA
has changeTraitPrivateMembersModified
andB
extendsA
.B
is not changed, henceC
is not recompiled even thoughC
extendsB
.Fix
When we compute
extraHash
for a child trait, use the parent traits'extraHash
. Therefore, when parent has private members modified, childextraHash
would change, hence child would haveTraitPrivateMembersModified
, propagating it.