Skip to content
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

Better incremental compilation support #10420

Closed
snazy opened this issue Sep 2, 2019 · 2 comments
Closed

Better incremental compilation support #10420

snazy opened this issue Sep 2, 2019 · 2 comments
Labels
a:feature A new functionality
Milestone

Comments

@snazy
Copy link
Contributor

snazy commented Sep 2, 2019

As discussed with @oehme , it would be neat to improve the current algorithm to detect classes to recompile.

For example, consider these classes:

class A {
  private B b
}
class B {
  private C c
}
class C {
}

The previous algorithm in ClassSetAnalysis.getRelevantDependents would recompile all classes, if C was changed, because it walks the whole dependency graph and does not consider the "accessibility" of a dependency.

I.e. changing the class C should only recompile C,because it has changed, and B as a user of C and not A, because it is not affected by the change in C.

The updated algorithm does exactly this by checking the "accessibility" (private or not). "Accessible" dependents are recursively evaluated as before, but "private" dependents are not.

@snazy
Copy link
Contributor Author

snazy commented Sep 2, 2019

As a follow-up, it could be possible to further enhance the algorithm to not just distinguish between private and non-private, but to also distinguish:

  • "package private"
  • protected

However, the current proposal in #10419 is probably a "good enough" improvement for now.

@oehme oehme added this to the 6.0 RC1 milestone Sep 18, 2019
@oehme
Copy link
Contributor

oehme commented Sep 18, 2019

Done in #10419

@oehme oehme closed this as completed Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants