Ran
|
Files
353
|
Run time
11s
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
Improved go remote library support. GoFetch now supports remote libraries with nested packages as well as implicit targets for transitive dependencies that fall within the same remote import path root as an explicitly declared remote dependency. The awkward fit of zip_url to the more generically named GoRemoteLibrary is fixed by moving the task of fetching fully out to a Fetchers subsystem that works by delegating based on matches against the remote import path. To support this, both GoRemoteLibrary and GoLocalSource targets gain a consistent notion of `import_path` that matches the same concept in go. The existing zip download functionality for remote libraries on github is extracted to a generic ArchiveFetcher implementation with a default configuration that knows how to construct and github archive URLs and unpack them. Additionally, a 'go_remote_libraries' macro is introduced to allow for depending on a suite of packages at a single revision without repeating the version in the BUILD file. Testing Done: Tested this in Medium's mono-repo in a manual test case that's now replicated by the `GoFetchIntegrationTest.test_issues_1998` test. Also some ad-hoc testing of the fetcher options like so (flip default github `.tar.gz` fetch to `.zip`): ```console $ ./pants \ --fetchers-mapping="{r'github.com/':'ArchiveFetcher'}" \ --archive-fetcher-matchers="{r'github.com/(?P<user>[^/]+)/(?P<repo>[^/]+)':('https://github.com/\g<user>/\g<repo>/archive/{rev}.zip', 'master', 1)}" \ compile contrib/go/examples/3rdparty/go/github.com/AdRoll/goamz:dynamodb ... 13:24:38 00:00 [resolve] 13:24:38 00:00 [ivy] 13:24:38 00:00 [cache]. 13:24:38 00:00 [go] Invalidated 1 target.INFO] Downloading https://github.com/AdRoll/goamz/archive/51b70b003.zip... Invalidated 3 targets.INFO] Downloading https://github.com/bitly/go-simplejson/archive/v0.4.3.zip... Invalidated 1 target.INFO] Downloading https://github.com/cbroglie/mapstructure/archive/25325b46b.zip... ... $ $ tree .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.AdRoll.goamz.dynamodb/pkg/linux_amd64/github.com/AdRoll/goamz/ .pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.AdRoll.goamz.dynamodb/pkg/linux_amd64/github.com/AdRoll/goamz/ ├── aws.a -> /home/jsirois/dev/3rdparty/jsirois-pants4/.pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.AdRoll.goamz.aws/pkg/linux_amd64/github.com/AdRoll/goamz/aws.a ├── dynamodb │ └── dynamizer.a -> /home/jsirois/dev/3rdparty/jsirois-pants4/.pants.d/compile/go/contrib.go.examples.3rdparty.go.github.com.AdRoll.goamz.dynamodb.dynamizer/pkg/linux_amd64/github.com/AdRoll/goamz/dynamodb/dynamizer.a └── dynamodb.a 1 directory, 3 files ``` CI went green here: https://travis-ci.org/pantsbuild/pants/builds/76318249 Bugs closed: 1998, 2013 Reviewed at https://rbcommons.com/s/twitter/r/2655/
14887 of 21444 relevant lines covered (69.42%)
0.69 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|