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

Notify ClassFileManager from IncOptions in Incremental.prune #1148

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

lrytz
Copy link
Contributor

@lrytz lrytz commented Nov 9, 2022

The Incremental.prune method creates a deleteImmediately ClassFileManager to prune the classfiles of invalidated sources. This means that the external ClassFileManager defined in options.externalHooks is not notified about these deletions.

Changing this to use ClassFileManager.getClassFileManager creates a WrappedClassFileManager, which also uses deleteImmediately (unless configured otherwise by incOptions.classfileManagerType), and additionaly notifies the external manager from options.externalHooks.

Fixes #1147

The `Incremental.prune` method creates a `deleteImmediately`
`ClassFileManager` to prune the classfiles of invalidated sources.
This means that the external `ClassFileManager` defined in
`options.externalHooks` is not notified about these deletions.

Changing this to use `ClassFileManager.getClassFileManager` creates
a `WrappedClassFileManager`, which also uses `deleteImmediately`
(unless configured otherwise by `incOptions.classfileManagerType`), and
additionaly notifies the external manager from `options.externalHooks`.
@lightbend-cla-validator

This comment was marked as resolved.

@lrytz lrytz requested a review from dwijnand November 9, 2022 11:02
@lrytz lrytz merged commit 384d1e2 into sbt:develop Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configured ClassFileManager not used in IncrementalCompilerImpl.prevAnalysis
3 participants