diff options
author | 2017-07-11 22:22:22 +0200 | |
---|---|---|
committer | 2017-07-12 08:50:25 +0200 | |
commit | 63570924746274c128e80d3a43558e0d3fad3051 (patch) | |
tree | 5e08769586efd9efd87a926d47bc9770e68f2c24 /src/test/java/com | |
parent | 3e36d7a88a39d3bb3442c6c2e67c6d83cf0ae0e4 (diff) |
Automated rollback of commit 937350211dcd55a4714ec32ebbf33fffcc42cdf2.
*** Reason for rollback ***
Broke the go rules (of course)
See http://ci.bazel.io/job/rules_go/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/1044/console.
*** Original change description ***
Resolve references to @main-repo//foo to //foo
Bazel was creating an dummy external repository for @main-repo, which
doesn't work with package paths and will cause conflicts once
@main-repo//foo and //foo refer to the same path.
This adds a "soft pull" option to WorkspaceNameFunction: it can either
parse the entire WORKSPACE file to find the name or just the first section.
That way PackageLookupFunction can find the repository name without causing
a circular dependency.
This should have no ch...
***
PiperOrigin-RevId: 161572272
Diffstat (limited to 'src/test/java/com')
2 files changed, 2 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/repository/skylark/SkylarkRepositoryIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/bazel/repository/skylark/SkylarkRepositoryIntegrationTest.java index 35b08e1444..004987d7b8 100644 --- a/src/test/java/com/google/devtools/build/lib/bazel/repository/skylark/SkylarkRepositoryIntegrationTest.java +++ b/src/test/java/com/google/devtools/build/lib/bazel/repository/skylark/SkylarkRepositoryIntegrationTest.java @@ -297,7 +297,7 @@ public class SkylarkRepositoryIntegrationTest extends BuildViewTestCase { invalidatePackages(); try { - getTarget("@git_repo//:whatever"); + getTarget("@//:git_repo"); fail(); } catch (AssertionError expected) { assertThat(expected) @@ -332,7 +332,7 @@ public class SkylarkRepositoryIntegrationTest extends BuildViewTestCase { fail(); } catch (NoSuchPackageException e) { // This is expected - assertThat(e).hasMessageThat().contains("Package 'external' contains errors"); + assertThat(e).hasMessageThat().contains("Could not load //external package"); } assertContainsEvent("missing value for mandatory attribute 'path' in 'local_repository' rule"); } diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/PackageLookupFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/PackageLookupFunctionTest.java index f407c247c1..7e770ffe81 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/PackageLookupFunctionTest.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/PackageLookupFunctionTest.java @@ -123,7 +123,6 @@ public abstract class PackageLookupFunctionTest extends FoundationTestCase { ruleClassProvider, scratch.getFileSystem()), directories)); - skyFunctions.put(SkyFunctions.WORKSPACE_NAME, new WorkspaceNameFunction()); skyFunctions.put(SkyFunctions.EXTERNAL_PACKAGE, new ExternalPackageFunction()); skyFunctions.put(SkyFunctions.LOCAL_REPOSITORY_LOOKUP, new LocalRepositoryLookupFunction()); skyFunctions.put( |