Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor dependencies, make Prysm "go gettable" #6053

Merged
merged 37 commits into from
May 31, 2020
Merged

Refactor dependencies, make Prysm "go gettable" #6053

merged 37 commits into from
May 31, 2020

Conversation

prestonvanloon
Copy link
Member

@prestonvanloon prestonvanloon commented May 29, 2020

What type of PR is this?

Feature

What does this PR do? Why is it needed?

At Prysmatic Labs, we use the Bazel build tool for many reasons including:

  • Reproducible builds
  • Polyglot language support
  • Reliable build configuration / customization
  • Powerful query language
  • Cross compilation support
  • Docker build support
  • And many more (full documentation page coming soon FR: Why Bazel? documentation#138)

However, we recognize that Bazel build tooling adds friction to the average go developer. As such, we would like to provide first class support for go build/test. Additionally, for those users that wish to build upon Prysm with bazel, we're providing a prysm_deps() starlark rule that can be loaded in the downstream WORKSPACE.

# In your WORKSPACE file.

http_archive(
    name = "prysm",
    strip_prefix = "prysm-master",
    urls = [ # Ideally, choose a specific commit instead of using master.
        "https://github.com/prysmaticlabs/prysm/archive/master.tar.gz",
    ],
)

load("@prysm//:deps.bzl", "prysm_deps") 
prysm_deps()

Which issues(s) does this PR fix?

Fixes #6035 (go build)
Fixes #6005 (deps refactor for downstream users)
Fixes #6011 (update deps to recent version)

Other notes for review

  • Refactor deps to be loadable by downstream users (See deps.bzl)
  • Add go build/test CI rule (using github actions)
  • Add documentation on dependency updates and policy (see DEPENDENCIES.md)
  • CI green checkmark

** Diff is large due to generated files. **

Please review:

  • WORKSPACE
  • DEPENDENCIES.md
  • deps.bzl
  • Changes in go files

Other notable changes:

prestonvanloon and others added 3 commits May 28, 2020 16:36
* update libs

* add new validators

* add new deps

* new set of deps

* tls

* further fix gossip update

* get everything to build

* clean up

* gaz

* fix build

* fix all tests

* add deps to images

* imports

Co-authored-by: rauljordan <raul@prysmaticlabs.com>
@prestonvanloon prestonvanloon changed the title Deps Refactor dependencies, make Prysm "go gettable" May 29, 2020
@prestonvanloon prestonvanloon added the Ready For Review A pull request ready for code review label May 30, 2020
@prestonvanloon prestonvanloon marked this pull request as ready for review May 30, 2020 21:57
@prestonvanloon prestonvanloon requested a review from a team as a code owner May 30, 2020 21:57
Copy link
Member

@nisdas nisdas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great

@alonmuroch
Copy link
Contributor

@prestonvanloon this is awesome!
Will change our integration from bazel to go mod and will report back :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
5 participants