diff --git a/src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java b/src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java index c0afd349ff13f1..4a31e6a99487a5 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java @@ -516,7 +516,14 @@ private ActionSpawn( parent.getRunfilesSupplier(), parent, parent.resourceSetOrBuilder); - this.inputs = getNonFilesetInputs(inputs).addAll(additionalInputs).build(); + NestedSetBuilder inputsBuilder = NestedSetBuilder.stableOrder(); + for (Artifact input : inputs.toList()) { + if (!input.isFileset()) { + inputsBuilder.add(input); + } + } + inputsBuilder.addAll(additionalInputs); + this.inputs = inputsBuilder.build(); this.filesetMappings = filesetMappings; this.pathMapper = pathMapper;