-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overcompilation on 1.10.x due to potentially incorrect initial invalidation #1420
Comments
Thanks for the reproduction.
|
Using sbt 1.10.2
sbt 1.9.9
So to me the problem is not union type, but actually the initial invalidation source has regressed in 1.10.x? |
I think the different set of initial invalidation is caused by #1284. I am not sure why does |
Yea. Given the change is around the initial invalidation, that could be right: - val invalidatedClasses = removedClasses ++ dependentOnRemovedClasses ++ modifiedClasses
+ val mutualDependentOnModifiedClasses = {
+ val dependentOnModifiedClasses = modifiedClasses.flatMap(previous.memberRef.internal.reverse)
+ dependentOnModifiedClasses.filter(dependent =>
+ previous.memberRef.internal.reverse(dependent).exists(modifiedClasses)
+ )
+ }
+ val invalidatedClasses =
+ removedClasses ++ dependentOnRemovedClasses ++ modifiedClasses ++ mutualDependentOnModifiedClasses @Friendseeker Do you remember why we need to invalidate based on memberRef here? |
I guess #598 (comment)
by @smarter. So we detect circular dependency at the class level, and invalidate them together? |
Follow-up to #1396
steps
clean;compile
Entities.f
or change the comment in the same filecompile
problem
There are two compilation cycles:
expectation
No more compilation cycles should be needed on a change which does not change the API.
notes
sbt.internal.inc.Analysis
and prints which files were compiled and what classed have changed their API as a result of compilation. When used on this repro, it showsapiHash
change onEntityState
classcompile
again, there is only one compilation cycle. The additional cycle happens only on the firstcompile
afterclean;compile
.The text was updated successfully, but these errors were encountered: