Improved go remote library support. #2013
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 sameconcept 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.
https://rbcommons.com/s/twitter/r/2655/