Name: issues-3417
Owner: Pants Build
Description: This repo serves as a minimal example of the problems described in https://github.com/pantsbuild/pants/issues/3417.
Created: 2016-05-12 04:22:35.0
Updated: 2016-05-12 04:29:56.0
Pushed: 2016-05-12 16:05:01.0
Size: 10
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
src/go/src
layout repo with pants.First seed.
seed.sh
22:41:55 00:00 [main]
(To run a reporting server: ./pants server)
22:41:55 00:00 [setup] 22:41:55 00:00 [parse]
Executing tasks in goals: buildgen
22:41:55 00:00 [buildgen] 22:41:55 00:00 [go].
3rdparty/go/github.com/gorilla/mux/BUILD (github.com/gorilla/mux) FLOATING
src/go/src/server/BUILD (src/server)
Un-pinned (FLOATING) Go remote library dependencies are not allowed in this repository!
Found the following FLOATING Go remote libraries:
3rdparty/go/github.com/gorilla/mux/BUILD (github.com/gorilla/mux) FLOATING
You can fix this by editing the target in each FLOATING BUILD file listed above to include a `rev` parameter that points to a sha, tag or commit id that pins the code in the source repository to a fixed, non-FLOATING version.
FAILURE: Un-pinned (FLOATING) Go remote libraries detected.
22:41:55 00:00 [complete]
FAILURE
in `github.com/gorilla/mux`.
```diff
t diff
--git a/3rdparty/go/github.com/gorilla/mux/BUILD b/3rdparty/go/github.com/gorilla/mux/BUILD
x 5d283d4..38ed297 100644
a/3rdparty/go/github.com/gorilla/mux/BUILD
b/3rdparty/go/github.com/gorilla/mux/BUILD
1,4 +1,4 @@
uto-generated by pants!
o re-generate run: `pants buildgen.go --materialize --remote`
remote_library()
remote_library(rev='v1.1')
First try to build the binary.
pants binary ::
22:44:57 00:00 [main]
(To run a reporting server: ./pants server)
22:44:57 00:00 [setup] 22:44:57 00:00 [parse]
Executing tasks in goals: bootstrap -> imports -> unpack-jars -> deferred-sources -> jvm-platform-validate -> gen -> resolve -> resources -> compile -> binary
22:44:57 00:00 [bootstrap] 22:44:57 00:00 [jar-dependency-management] 22:44:57 00:00 [bootstrap-jvm-tools] 22:44:57 00:00 [imports] 22:44:57 00:00 [ivy-imports] 22:44:57 00:00 [unpack-jars] 22:44:57 00:00 [unpack-jars] 22:44:57 00:00 [deferred-sources] 22:44:57 00:00 [deferred-sources] 22:44:57 00:00 [jvm-platform-validate] 22:44:57 00:00 [jvm-platform-validate] 22:44:57 00:00 [gen] 22:44:57 00:00 [go-thrift] 22:44:57 00:00 [thrift] 22:44:57 00:00 [protoc] 22:44:57 00:00 [antlr] 22:44:57 00:00 [ragel] 22:44:57 00:00 [jaxb] 22:44:57 00:00 [wire] 22:44:57 00:00 [resolve] 22:44:57 00:00 [ivy] 22:44:57 00:00 [cache] 22:44:57 00:00 [bootstrap-nailgun-server] 22:44:57 00:00 [go] 22:44:57 00:00 [cache]
No cached artifacts for 1 target.
Invalidated 1 target.INFO] Downloading https://github.com/gorilla/mux/archive/v1.1.tar.gz...
22:45:00 00:03 [github.com/gorilla/mux]WARN] Injecting dependency from BuildFileAddress(BuildFile(3rdparty/go/github.com/gorilla/mux/BUILD, FileSystemProjectTree(/home/jsirois/dev/pantsbuild/issues-3417)), mux) on 3rdparty/go/github.com/gorilla/context:context, but the dependency is not in the BuildGraph. This probably indicates a dependency cycle, but it is not an error until sort_targets is called on a subgraph containing the cycle.
3rdparty/go/github.com/gorilla/mux has remote dependencies which require local declaration:
--> github.com/gorilla/context (expected go_remote_library declaration at 3rdparty/go/github.com/gorilla/context)
FAILURE: Failed to resolve transitive Go remote dependencies.
Waiting for background workers to finish.
22:45:00 00:03 [complete]
FAILURE
econd seed.
```
dir -p 3rdparty/go/github.com/gorilla/context && echo "go_remote_library()" > 3rdparty/go/github.com/gorilla/context/BUILD
seed.sh
5:52 00:00 [main]
(To run a reporting server: ./pants server)
5:52 00:00 [setup]
5:52 00:00 [parse]
Executing tasks in goals: buildgen
5:52 00:00 [buildgen]
5:52 00:00 [go].
3rdparty/go/github.com/gorilla/mux/BUILD (github.com/gorilla/mux) v1.1
3rdparty/go/github.com/gorilla/context/BUILD (github.com/gorilla/context) FLOATING
src/go/src/server/BUILD (src/server)
Un-pinned (FLOATING) Go remote library dependencies are not allowed in this repository!
Found the following FLOATING Go remote libraries:
3rdparty/go/github.com/gorilla/context/BUILD (github.com/gorilla/context) FLOATING
You can fix this by editing the target in each FLOATING BUILD file listed above to include a `rev` parameter that points to a sha, tag or commit id that pins the code in the source repository to a fixed, non-FLOATING version.
URE: Un-pinned (FLOATING) Go remote libraries detected.
5:53 00:01 [complete]
FAILURE
Pin github.com/gorilla/context
.
t diff
--git a/3rdparty/go/github.com/gorilla/context/BUILD b/3rdparty/go/github.com/gorilla/context/BUILD
x 5d283d4..38ed297 100644
a/3rdparty/go/github.com/gorilla/context/BUILD
b/3rdparty/go/github.com/gorilla/context/BUILD
1,4 +1,4 @@
to-generated by pants!
re-generate run: `pants buildgen.go --materialize --remote`
-go_remote_library() +go_remote_library(rev='v1.1')
ucceed at building the binary.
```
pants binary ::
8:21 00:00 [main]
(To run a reporting server: ./pants server)
8:21 00:00 [setup]
8:21 00:00 [parse]
Executing tasks in goals: bootstrap -> imports -> unpack-jars -> deferred-sources -> gen -> jvm-platform-validate -> resolve -> resources -> compile -> binary
8:21 00:00 [bootstrap]
8:21 00:00 [jar-dependency-management]
8:21 00:00 [bootstrap-jvm-tools]
8:21 00:00 [imports]
8:21 00:00 [ivy-imports]
8:21 00:00 [unpack-jars]
8:21 00:00 [unpack-jars]
8:21 00:00 [deferred-sources]
8:21 00:00 [deferred-sources]
8:21 00:00 [gen]
8:21 00:00 [go-thrift]
8:21 00:00 [thrift]
8:21 00:00 [protoc]
8:21 00:00 [antlr]
8:21 00:00 [ragel]
8:21 00:00 [jaxb]
8:21 00:00 [wire]
8:21 00:00 [jvm-platform-validate]
8:21 00:00 [jvm-platform-validate]
8:21 00:00 [resolve]
8:21 00:00 [ivy]
8:21 00:00 [go]
8:21 00:00 [cache]
No cached artifacts for 1 target.
Invalidated 1 target.INFO] Downloading https://github.com/gorilla/context/archive/v1.1.tar.gz...
8:23 00:02 [github.com/gorilla/context]
8:24 00:03 [github.com/gorilla/mux]
8:24 00:03 [resources]
8:24 00:03 [prepare]
8:24 00:03 [services]
8:24 00:03 [compile]
8:24 00:03 [compile-jvm-prep-command]
8:24 00:03 [jvm_prep_command]
8:24 00:03 [compile-prep-command]
8:24 00:03 [go]
8:24 00:03 [cache]
No cached artifacts for 3 targets.
Invalidated 3 targets.
8:24 00:03 [install]
8:24 00:03 [install]
8:24 00:03 [install]
8:25 00:04 [gofmt]
8:25 00:04 [cache]
No cached artifacts for 1 target.
Invalidated 1 target.
8:25 00:04 [compile]
8:25 00:04 [zinc]
8:25 00:04 [jvm-dep-check]
8:25 00:04 [binary]
8:25 00:04 [binary-jvm-prep-command]
8:25 00:04 [jvm_prep_command]
8:25 00:04 [binary-prep-command]
8:25 00:04 [go]
creating dist/go/bin/server
8:25 00:04 [python-binary-create]
8:25 00:04 [jvm]
8:25 00:04 [dup]
Waiting for background workers to finish.
8:25 00:04 [complete]
SUCCESS
ee dist/
/
go
??? bin
??? server
rectories, 1 file
le dist/go/bin/server
/go/bin/server: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped