diff options
author | Klaus Aehlig <aehlig@google.com> | 2018-04-09 05:29:40 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-09 05:30:56 -0700 |
commit | 36bac4d8d1883292b81888140244a36cff45944a (patch) | |
tree | 4b1f47a5aa83cff6241886baf65637bacc43d2bf /src/main/java/com/google/devtools/build/lib/rules/repository | |
parent | f89ecda0d6e3a79056313111386e91f993a0be67 (diff) |
Remove warning about non-canonical workspace names
While we still recommend to name repositories in canonical way, a canonical way
can not always be ensured, e.g., if different versions of the same external
repository have to be used. Our design for upcoming renaming repositories honors
this observation. So remove the old warning about the name in an external
repository's WORKSPACE file not matching the name given to it in the global
WORKSPACE file; we certainly will not make this an error in the future.
Change-Id: I5eef92ec61dc81d25734d71187a635024630322c
PiperOrigin-RevId: 192114195
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/repository')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryLoaderFunction.java | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryLoaderFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryLoaderFunction.java index f2cda7aa7d..f4dba5e373 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryLoaderFunction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryLoaderFunction.java @@ -14,14 +14,10 @@ package com.google.devtools.build.lib.rules.repository; -import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.cmdline.LabelSyntaxException; import com.google.devtools.build.lib.cmdline.RepositoryName; -import com.google.devtools.build.lib.events.Event; -import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.skyframe.RepositoryValue; import com.google.devtools.build.lib.skyframe.WorkspaceFileValue; -import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.lib.vfs.Root; import com.google.devtools.build.lib.vfs.RootedPath; @@ -31,9 +27,7 @@ import com.google.devtools.build.skyframe.SkyKey; import com.google.devtools.build.skyframe.SkyValue; import javax.annotation.Nullable; -/** - * Creates a local or remote repository and checks its WORKSPACE file. - */ +/** Creates a local or remote repository. */ public class RepositoryLoaderFunction implements SkyFunction { @Nullable @@ -71,16 +65,6 @@ public class RepositoryLoaderFunction implements SkyFunction { throw new IllegalStateException(e); } - if (!workspaceName.isDefault() - && !workspaceName.strippedName().equals(Label.DEFAULT_REPOSITORY_DIRECTORY) - && !nameFromRule.equals(workspaceName)) { - Path workspacePath = repository.getPath().getRelative("WORKSPACE"); - env.getListener().handle(Event.warn(Location.fromFile(workspacePath), - "Workspace name in " + workspacePath + " (" + workspaceName + ") does not match the " - + "name given in the repository's definition (" + nameFromRule + "); this will " - + "cause a build error in future versions")); - } - return RepositoryValue.success(nameFromRule, repository); } |