diff options
| author | Romain Jobredeaux <jobredeaux@google.com> | 2023-07-19 20:58:27 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-07-19 20:58:27 +0000 |
| commit | e3989a114d467790a5c7fe2ec6db12b2d7e253d5 (patch) | |
| tree | 431e249a7a052969958ddc82a947c4c7bb9d3a0b /bazel | |
| parent | e9ae480a82b3d39856a2062ccefe25414001df54 (diff) | |
Revert "Add workaround for a file with an mtime in the future"
This reverts commit e9ae480a82b3d39856a2062ccefe25414001df54.
Reason for revert: Should no longer be needed after https://android-review.git.corp.google.com/q/topic:%22use_vendored_java_rules%22
Change-Id: Ic3abed3c27fe4669df811b993d87ae5450c79d7e
Diffstat (limited to 'bazel')
| -rw-r--r-- | bazel/aquery.go | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/bazel/aquery.go b/bazel/aquery.go index d4879b107..480158c11 100644 --- a/bazel/aquery.go +++ b/bazel/aquery.go @@ -115,7 +115,6 @@ type BuildStatement struct { // input path string, but not both. InputDepsetHashes []string InputPaths []string - OrderOnlyInputs []string FileContents string } @@ -135,8 +134,6 @@ type aqueryArtifactHandler struct { depsetHashToArtifactPathsCache sync.Map // Maps artifact ids to fully expanded paths. artifactIdToPath map[artifactId]string - - extraBuildStatements []*BuildStatement } // The tokens should be substituted with the value specified here, instead of the @@ -166,29 +163,13 @@ func newAqueryHandler(aqueryResult *analysis_v2_proto.ActionGraphContainer) (*aq return pathFragmentId(pf.Id) }) - var extraBuildStatements []*BuildStatement artifactIdToPath := make(map[artifactId]string, len(aqueryResult.Artifacts)) for _, artifact := range aqueryResult.Artifacts { artifactPath, err := expandPathFragment(pathFragmentId(artifact.PathFragmentId), pathFragments) if err != nil { return nil, err } - if strings.HasSuffix(artifactPath, "DumpPlatformClassPath.java") { - // TODO(b/291828210): This is a workaround for the fact that DumpPlatformClassPath.java - // has a timestamp in 2033. We'll copy it to a new file using a order-only dep, so that - // the file is not recopied every build. Technically the order-only dep would produce - // incremental build issues if this was a regular file produced as part of the build, - // but this file is actually created by bazel during analysis, so it's not an issue. - outputPath := "hack_for_b291828210/DumpPlatformClassPath.java" - extraBuildStatements = append(extraBuildStatements, &BuildStatement{ - Command: fmt.Sprintf("cp %s %s", artifactPath, outputPath), - OutputPaths: []string{outputPath}, - OrderOnlyInputs: []string{artifactPath}, - }) - artifactIdToPath[artifactId(artifact.Id)] = outputPath - } else { - artifactIdToPath[artifactId(artifact.Id)] = artifactPath - } + artifactIdToPath[artifactId(artifact.Id)] = artifactPath } // Map middleman artifact ContentHash to input artifact depset ID. @@ -215,7 +196,6 @@ func newAqueryHandler(aqueryResult *analysis_v2_proto.ActionGraphContainer) (*aq depsetHashToArtifactPathsCache: sync.Map{}, emptyDepsetIds: make(map[depsetId]struct{}, 0), artifactIdToPath: artifactIdToPath, - extraBuildStatements: extraBuildStatements, } // Validate and adjust aqueryResult.DepSetOfFiles values. @@ -389,7 +369,6 @@ func AqueryBuildStatements(aqueryJsonProto []byte, eventHandler *metrics.EventHa if err != nil { return nil, nil, err } - buildStatements = append(buildStatements, aqueryHandler.extraBuildStatements...) depsetsByHash := map[string]AqueryDepset{} depsets := make([]AqueryDepset, 0, len(aqueryHandler.depsetIdToAqueryDepset)) |
