8000 Update visibility of fields and methods in `SkyframeExecutor` and `Se… · coderabbit-test/bazel@d175f08 · GitHub
[go: up one dir, main page]

Skip to content

Commit d175f08

Browse files
Googlercopybara-github
authored andcommitted
Update visibility of fields and methods in SkyframeExecutor and SequencedSkyframeExecutor
PiperOrigin-RevId: 554547633 Change-Id: I3625f3d2b76bcaad040b1ba01c2b44e6ef5902d4
1 parent dcaa59e commit d175f08

File tree

2 files changed

+14
-28
lines changed

2 files changed

+14
-28
lines changed

src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,7 @@ protected void onPkgLocatorChange(PathPackageLocator oldLocator, PathPackageLoca
319319
invalidate(SkyFunctionName.functionIsIn(PACKAGE_LOCATOR_DEPENDENT_VALUES));
320320
}
321321

322-
@Override
323-
protected void invalidate(Predicate<SkyKey> pred) {
322+
void invalidate(Predicate<SkyKey> pred) {
324323
recordingDiffer.invalidate(Iterables.filter(memoizingEvaluator.getValues().keySet(), pred));
325324
}
326325

src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,13 @@
278278
*/
279279
public abstract class SkyframeExecutor implements WalkableGraphFactory {
280280
private static final GoogleLogger logger = GoogleLogger.forEnclosingClass();
281-
282281
protected MemoizingEvaluator memoizingEvaluator;
283282
protected final EmittedEventState emittedEventState = new EmittedEventState();
284283
protected final PackageFactory pkgFactory;
285284
private final WorkspaceStatusAction.Factory workspaceStatusActionFactory;
286285
protected final FileSystem fileSystem;
287286
protected final BlazeDirectories directories;
288-
protected final ExternalFilesHelper externalFilesHelper;
287+
final ExternalFilesHelper externalFilesHelper;
289288
protected final BugReporter bugReporter;
290289

291290
/**
@@ -298,7 +297,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
298297
private final FilesMetricConsumer outputArtifactsFromActionCache = new FilesMetricConsumer();
299298
private final FilesMetricConsumer topLevelArtifactsMetric = new FilesMetricConsumer();
300299

301-
@Nullable protected OutputService outputService;
300+
@Nullable OutputService outputService;
302301

303302
// TODO(bazel-team): Figure out how to handle value builders that block internally. Blocking
304303
// 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 {
332331

333332
// AtomicReferences are used here as mutable boxes shared with value builders.
334333
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 =
337336
new AtomicReference<>(ImmutableSet.of());
338337
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<>();
341340

342341
private final ArtifactFactory artifactFactory;
343342
private final ActionKeyContext actionKeyContext;
344343

345-
protected boolean active = true;
344+
boolean active = true;
346345
private final SkyframePackageManager packageManager;
347346
private final QueryTransitivePackagePreloader queryTransitivePackagePreloader;
348347

@@ -355,7 +354,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
355354
private ActionExecutionFunction actionExecutionFunction;
356355
private BuildDriverFunction buildDriverFunction;
357356
private GlobFunction globFunction;
358-
protected SkyframeProgressReceiver progressReceiver;
357+
SkyframeProgressReceiver progressReceiver;
359358
private CyclesReporter cyclesReporter = null;
360359

361360
@VisibleForTesting boolean lastAnalysisDiscarded = false;
@@ -371,8 +370,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
371370

372371
private final ImmutableMap<SkyFunctionName, SkyFunction> extraSkyFunctions;
373372

374-
protected SkyframeIncrementalBuildMonitor incrementalBuildMonitor =
375-
new SkyframeIncrementalBuildMonitor();
373+
SkyframeIncrementalBuildMonitor incrementalBuildMonitor = new SkyframeIncrementalBuildMonitor();
376374

377375
private final SkyFunction ignoredPackagePrefixesFunction;
378376

@@ -447,7 +445,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
447445

448446
protected Duration sourceDiffCheckingDuration = Duration.ofSeconds(-1L);
449447

450-
class PathResolverFactoryImpl implements PathResolverFactory {
448+
final class PathResolverFactoryImpl implements PathResolverFactory {
451449
@Override
452450
public boolean shouldCreatePathResolverForArtifactValues() {
453451
return outputService != null && outputService.supportsPathResolverForArtifactValues();
@@ -1326,8 +1324,6 @@ public AtomicReference<PathPackageLocator> getPackageLocator() {
13261324
return pkgLocator;
13271325
}
13281326

1329-
protected abstract void invalidate(Predicate<SkyKey> pred);
1330-
13311327
protected Differencer.Diff getDiff(
13321328
TimestampGranularityMonitor tsgm,
13331329
ModifiedFileSet modifiedFileSet,
@@ -2239,11 +2235,6 @@ public Optional<UniverseScope> maybeGetHardcodedUniverseScope() {
22392235
return Optional.empty();
22402236
}
22412237

2242-
@ForOverride
2243-
protected SkyKey getUniverseKey(Collection<String> patterns, PathFragment offset) {
2244-
return PrepareDepsOfPatternsValue.key(ImmutableList.copyOf(patterns), offset);
2245-
}
2246-
22472238
/** Returns the generating action of a given artifact ({@code null} if it's a source artifact). */
22482239
@Nullable
22492240
private ActionAnalysisMetadata getGeneratingAction(
@@ -2802,9 +2793,10 @@ protected class SkyframeProgressReceiver implements EvaluationProgressReceiver {
28022793
* cache because of --discard_analysis_cache flag. For that case we want to keep the legacy data
28032794
* but get rid of the Skyframe data.
28042795
*/
2805-
protected boolean ignoreInvalidations = false;
2796+
boolean ignoreInvalidations = false;
2797+
28062798
/** This receiver is only needed for execution, so it is null otherwise. */
2807-
@Nullable EvaluationProgressReceiver executionProgressReceiver = null;
2799+
@Nullable private EvaluationProgressReceiver executionProgressReceiver = null;
28082800

28092801
/**
28102802
* 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() {
36893681
return ruleClassProvider;
36903682
}
36913683

3692-
@VisibleForTesting
3693-
public PackageFactory getPackageFactoryForTesting() {
3694-
return pkgFactory;
3695-
}
3696-
36973684
@VisibleForTesting
36983685
public PackageSettings getPackageSettingsForTesting() {
36993686
return pkgFactory.getPackageSettingsForTesting();

0 commit comments

Comments
 (0)
0