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

Document internals of invalidation and hook profiler #585

Merged
merged 6 commits into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ object Incremental {
val previous = previous0 match { case a: Analysis => a }
val incremental: IncrementalCommon =
new IncrementalNameHashing(log, options)
val initialChanges = incremental.changedInitial(sources, previous, current, lookup)
val initialChanges = incremental.detectInitialChanges(sources, previous, current, lookup)
val binaryChanges = new DependencyChanges {
val modifiedBinaries = initialChanges.binaryDeps.toArray
val modifiedClasses = initialChanges.external.allModified.toArray
Expand Down Expand Up @@ -118,15 +118,11 @@ object Incremental {
private[inc] def apiDebug(options: IncOptions): Boolean =
options.apiDebug || java.lang.Boolean.getBoolean(apiDebugProp)

private[sbt] def prune(invalidatedSrcs: Set[File], previous: CompileAnalysis): Analysis =
prune(invalidatedSrcs, previous, ClassFileManager.deleteImmediately)

private[sbt] def prune(invalidatedSrcs: Set[File],
previous0: CompileAnalysis,
classfileManager: XClassFileManager): Analysis = {
val previous = previous0 match { case a: Analysis => a }
classfileManager.delete(invalidatedSrcs.flatMap(previous.relations.products).toArray)
previous -- invalidatedSrcs
private[sbt] def prune(invalidatedSrcs: Set[File], previous0: CompileAnalysis): Analysis = {
val previous = previous0.asInstanceOf[Analysis]
IncrementalCommon.pruneClassFilesOfInvalidations(invalidatedSrcs,
previous,
ClassFileManager.deleteImmediately)
}

private[this] def manageClassfiles[T](options: IncOptions)(run: XClassFileManager => T): T = {
Expand Down
Loading