278
278
*/
279
279
public abstract class SkyframeExecutor implements WalkableGraphFactory {
280
280
private static final GoogleLogger logger = GoogleLogger .forEnclosingClass ();
281
-
282
281
protected MemoizingEvaluator memoizingEvaluator ;
283
282
protected final EmittedEventState emittedEventState = new EmittedEventState ();
284
283
protected final PackageFactory pkgFactory ;
285
284
private final WorkspaceStatusAction .Factory workspaceStatusActionFactory ;
286
285
protected final FileSystem fileSystem ;
287
286
protected final BlazeDirectories directories ;
288
- protected final ExternalFilesHelper externalFilesHelper ;
287
+ final ExternalFilesHelper externalFilesHelper ;
289
288
protected final BugReporter bugReporter ;
290
289
291
290
/**
@@ -298,7 +297,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
298
297
private final FilesMetricConsumer outputArtifactsFromActionCache = new FilesMetricConsumer ();
299
298
private final FilesMetricConsumer topLevelArtifactsMetric = new FilesMetricConsumer ();
300
299
301
- @ Nullable protected OutputService outputService ;
300
+ @ Nullable OutputService outputService ;
302
301
303
302
// TODO(bazel-team): Figure out how to handle value builders that block internally. Blocking
304
303
// operations may need to be handled in another (bigger?) thread pool. Also, we should detect
@@ -332,17 +331,17 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
332
331
333
332
// AtomicReferences are used here as mutable boxes shared with value builders.
334
333
private final AtomicBoolean showLoadingProgress = new AtomicBoolean ();
335
- protected final AtomicReference <PathPackageLocator > pkgLocator = new AtomicReference <>();
336
- protected final AtomicReference <ImmutableSet <PackageIdentifier >> deletedPackages =
334
+ private final AtomicReference <PathPackageLocator > pkgLocator = new AtomicReference <>();
335
+ final AtomicReference <ImmutableSet <PackageIdentifier >> deletedPackages =
337
336
new AtomicReference <>(ImmutableSet .of ());
338
337
private final AtomicReference <EventBus > eventBus = new AtomicReference <>();
339
- protected final AtomicReference <TimestampGranularityMonitor > tsgm = new AtomicReference <>();
340
- protected final AtomicReference <Map <String , String >> clientEnv = new AtomicReference <>();
338
+ final AtomicReference <TimestampGranularityMonitor > tsgm = new AtomicReference <>();
339
+ private final AtomicReference <Map <String , String >> clientEnv = new AtomicReference <>();
341
340
342
341
private final ArtifactFactory artifactFactory ;
343
342
private final ActionKeyContext actionKeyContext ;
344
343
345
- protected boolean active = true ;
344
+ boolean active = true ;
346
345
private final SkyframePackageManager packageManager ;
347
346
private final QueryTransitivePackagePreloader queryTransitivePackagePreloader ;
348
347
@@ -355,7 +354,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
355
354
private ActionExecutionFunction actionExecutionFunction ;
356
355
private BuildDriverFunction buildDriverFunction ;
357
356
private GlobFunction globFunction ;
358
- protected SkyframeProgressReceiver progressReceiver ;
357
+ SkyframeProgressReceiver progressReceiver ;
359
358
private CyclesReporter cyclesReporter = null ;
360
359
361
360
@ VisibleForTesting boolean lastAnalysisDiscarded = false ;
@@ -371,8 +370,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
371
370
372
371
private final ImmutableMap <SkyFunctionName , SkyFunction > extraSkyFunctions ;
373
372
374
- protected SkyframeIncrementalBuildMonitor incrementalBuildMonitor =
375
- new SkyframeIncrementalBuildMonitor ();
373
+ SkyframeIncrementalBuildMonitor incrementalBuildMonitor = new SkyframeIncrementalBuildMonitor ();
376
374
377
375
private final SkyFunction ignoredPackagePrefixesFunction ;
378
376
@@ -447,7 +445,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
447
445
448
446
protected Duration sourceDiffCheckingDuration = Duration .ofSeconds (-1L );
449
447
450
- class PathResolverFactoryImpl implements PathResolverFactory {
448
+ final class PathResolverFactoryImpl implements PathResolverFactory {
451
449
@ Override
452
450
public boolean shouldCreatePathResolverForArtifactValues () {
453
451
return outputService != null && outputService .supportsPathResolverForArtifactValues ();
@@ -1326,8 +1324,6 @@ public AtomicReference<PathPackageLocator> getPackageLocator() {
1326
1324
return pkgLocator ;
1327
1325
}
1328
1326
1329
- protected abstract void invalidate (Predicate <SkyKey > pred );
1330
-
1331
1327
protected Differencer .Diff getDiff (
1332
1328
TimestampGranularityMonitor tsgm ,
1333
1329
ModifiedFileSet modifiedFileSet ,
@@ -2239,11 +2235,6 @@ public Optional<UniverseScope> maybeGetHardcodedUniverseScope() {
2239
2235
return Optional .empty ();
2240
2236
}
2241
2237
2242
- @ ForOverride
2243
- protected SkyKey getUniverseKey (Collection <String > patterns , PathFragment offset ) {
2244
- return PrepareDepsOfPatternsValue .key (ImmutableList .copyOf (patterns ), offset );
2245
- }
2246
-
2247
2238
/** Returns the generating action of a given artifact ({@code null} if it's a source artifact). */
2248
2239
@ Nullable
2249
2240
private ActionAnalysisMetadata getGeneratingAction (
@@ -2802,9 +2793,10 @@ protected class SkyframeProgressReceiver implements EvaluationProgressReceiver {
2802
2793
* cache because of --discard_analysis_cache flag. For that case we want to keep the legacy data
2803
2794
* but get rid of the Skyframe data.
2804
2795
*/
2805
- protected boolean ignoreInvalidations = false ;
2796
+ boolean ignoreInvalidations = false ;
2797
+
2806
2798
/** This receiver is only needed for execution, so it is null otherwise. */
2807
- @ Nullable EvaluationProgressReceiver executionProgressReceiver = null ;
2799
+ @ Nullable private EvaluationProgressReceiver executionProgressReceiver = null ;
2808
2800
2809
2801
/**
2810
2802
* As the ActionLookupValues are marked done in the graph, put it in the map. This map will be
@@ -3689,11 +3681,6 @@ public ConfiguredRuleClassProvider getRuleClassProviderForTesting() {
3689
3681
return ruleClassProvider ;
3690
3682
}
3691
3683
3692
- @ VisibleForTesting
3693
- public PackageFactory getPackageFactoryForTesting () {
3694
- return pkgFactory ;
3695
- }
3696
-
3697
3684
@ VisibleForTesting
3698
3685
public PackageSettings getPackageSettingsForTesting () {
3699
3686
return pkgFactory .getPackageSettingsForTesting ();
0 commit comments