Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Reduce compilation invalidation scope of targets with strict_deps=True #4143
Related issue: #3060
Now, with strict_deps turned on, only direct dependencies will be used to compile jvm targets. But it isn't taken into account when generating fingerprints for compile. We can reduce the invalidation scope as well.
An example will be following:
I add a new "direct(self, target)" method in FingerpringStrategy abstract base class. This method returns "False" by default, derived class of FingerpringStrategy can override this method. In the case of this review, ResolvedJarAwareTaskIdentityFingerprintStrategy overrides this method so that when a target's strict_deps is defined then return its value, otherwise, platform's strict_deps property will be used. The target.transitive_invalidation_hash() method will use direct() method to determine the scope of invalidation hash.
This review also adds a unit test which verifies direct invalidation logic works as expected and several integration tests.
This is very close now! The semantics all look correct, there is just a bit of disagreement about which dependencies will be used between invalidation and actual usage. I think once that is fixed it will be ready to land.
referenced this pull request
Jan 4, 2017
One large comment and a couple nitpicks. I like where this is going though.