diff options
author | Kristina Chodorow <kchodorow@google.com> | 2017-03-03 14:06:45 +0000 |
---|---|---|
committer | Yue Gan <yueg@google.com> | 2017-03-06 09:44:22 +0000 |
commit | 0ca44769ea775485aac177664a13d4e178fa037b (patch) | |
tree | 3f860ad53e3ba6e4bf66f49f15adc335108c1799 /src/main/java/com/google/devtools/build/lib/analysis/buildinfo | |
parent | 6935ad673a9d1ee88945191c210dc80edfe02d84 (diff) |
Pass the repository name through to build info factories
I was fixing the Android tests and I noticed that the bazel_workspace_status_test was failing. It was like when you have a thread coming out of a sweater and you start pulling and pretty soon you have no sweater. Long story short, my "Android tests fix" cl ended up needing ~1k more lines changed (on top of the existing enormous CL).
So, I'm creating some smaller CLs with the changes that I can extract from the mega CL. Again.
Prep for #1681.
--
PiperOrigin-RevId: 149106039
MOS_MIGRATED_REVID=149106039
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/buildinfo')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/buildinfo/BuildInfoFactory.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/buildinfo/BuildInfoFactory.java b/src/main/java/com/google/devtools/build/lib/analysis/buildinfo/BuildInfoFactory.java index 2a4b4caf1f..07e991818e 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/buildinfo/BuildInfoFactory.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/buildinfo/BuildInfoFactory.java @@ -16,6 +16,7 @@ package com.google.devtools.build.lib.analysis.buildinfo; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.Root; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; +import com.google.devtools.build.lib.cmdline.RepositoryName; import com.google.devtools.build.lib.vfs.PathFragment; import java.io.Serializable; @@ -29,7 +30,7 @@ public interface BuildInfoFactory extends Serializable { /** * Type of the build-data artifact. */ - public enum BuildInfoType { + enum BuildInfoType { /** * Ignore changes to this file for the purposes of determining whether an action needs to be * re-executed. I.e., the action is only re-executed if at least one other input has changed. @@ -45,7 +46,7 @@ public interface BuildInfoFactory extends Serializable { /** * Context for the creation of build-info artifacts. */ - public interface BuildInfoContext { + interface BuildInfoContext { Artifact getBuildInfoArtifact(PathFragment rootRelativePath, Root root, BuildInfoType type); } @@ -53,7 +54,7 @@ public interface BuildInfoFactory extends Serializable { * Build-info key for lookup from the {@link * com.google.devtools.build.lib.analysis.AnalysisEnvironment}. */ - public static final class BuildInfoKey implements Serializable { + final class BuildInfoKey implements Serializable { private final String name; public BuildInfoKey(String name) { @@ -83,7 +84,7 @@ public interface BuildInfoFactory extends Serializable { * Create actions and artifacts for language-specific build-info files. */ BuildInfoCollection create(BuildInfoContext context, BuildConfiguration config, - Artifact buildInfo, Artifact buildChangelist); + Artifact buildInfo, Artifact buildChangelist, RepositoryName repositoryName); /** * Returns the key for the information created by this factory. |