forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new
--fail-floating
option to GoBuildgen
.
This advanced option allows a repo to set a policy that floating 3rdparty Go dependencies are not allowed. When buildgen is run and any existing or new Go remote libraries are found with no `rev` specified the build fails and instructions to remedy the situation logged. There is no support yet for this `--fail-floating` mode when not `--materializing` targets to disk. Testing Done: Ran locally in `--fail-floating` mode to tweak presentation. Looks like so: ``` ./pants buildgen.go --materialize --remote --fail-floating \ contrib/go/examples/:: ... contrib/go/examples/3rdparty/go/github.com/bitly/go-simplejson/BUILD (github.com/bitly/go-simplejson) v0.4.3 contrib/go/examples/3rdparty/go/github.com/gorilla/mux/BUILD (github.com/gorilla/mux) FLOATING contrib/go/examples/3rdparty/go/gopkg.in/fsnotify.v0/BUILD (gopkg.in/fsnotify.v0) v0.9.3 contrib/go/examples/3rdparty/go/github.com/bmizerany/assert/BUILD (github.com/bmizerany/assert) e17e99893cb6509f428e1728281c2ad60a6b31e3 contrib/go/examples/3rdparty/go/github.com/AdRoll/goamz/BUILD (github.com/AdRoll/goamz/dynamodb) 51b70b0035cf28c4ca6d719156347ac56a41d922 Un-pinned (FLOATING) Go remote library dependencies are not allowed in this repository! Found the following FLOATING Go remote libraries: contrib/go/examples/3rdparty/go/github.com/gorilla/context/BUILD (github.com/gorilla/context) FLOATING contrib/go/examples/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. 15:49:23 00:00 [complete] FAILURE ``` CI went green here: https://travis-ci.org/pantsbuild/pants/builds/89115429 Bugs closed: 2475, 2494 Reviewed at https://rbcommons.com/s/twitter/r/3073/
- Loading branch information
Showing
2 changed files
with
81 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters