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

Added crate_universe examples to CI #707

Merged
merged 7 commits into from
Apr 27, 2021
Merged

Added crate_universe examples to CI #707

merged 7 commits into from
Apr 27, 2021

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented Apr 23, 2021

This change introduces a new crate_universe_bootstrap macro which defines a repository rule for bootstrapping crate_universe_resolver binaries. crate_universe can now be made to bootstrap a binary (instead of downloading one) by using the RULES_RUST_CRATE_UNIVERSE_BOOTSTRAP environment variable and adding the crate_universe_bootstrap macro to your WORKSPACE file.

The goal of this PR is to enable testing for crate_universe which was originally solved by the ./bootstrap.sh script but this unfortunately lead to many issues. Using a repository rule to compose all the work needed for bootstrapping basically solved for all of these.

@google-cla google-cla bot added the cla: yes label Apr 23, 2021
@UebelAndre UebelAndre marked this pull request as ready for review April 26, 2021 07:36
Copy link
Collaborator

@illicitonion illicitonion 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, surprisingly nice and clean! Thanks for putting so much effort into it, it definitely paid off!

Can you also remove the now-stale bootstrap bazelrc files from the .gitignores? When testing this out locally they tripped me up, and if they'd shown up in my git status it would've saved me some head-scratching :)

crate_universe/bootstrap.bzl Outdated Show resolved Hide resolved
crate_universe/bootstrap.bzl Outdated Show resolved Hide resolved
crate_universe/defs.bzl Outdated Show resolved Hide resolved
examples/crate_universe/WORKSPACE.bazel Show resolved Hide resolved
.bazelci/presubmit.yml Show resolved Hide resolved
@UebelAndre
Copy link
Collaborator Author

@illicitonion ready for another pass 😄

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Looks great - thanks!

@UebelAndre UebelAndre merged commit a04ff41 into bazelbuild:main Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants