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

Generate rules/cpp/cc_configure.WORKSPACE from distdir_deps.bzl rather than keeping it in sync by hand #12743

Closed
wants to merge 23 commits into from

Conversation

aiuto
Copy link
Contributor

@aiuto aiuto commented Dec 22, 2020

Generate rules/cpp/cc_configure.WORKSPACE from distdir_deps.bzl rather than keeping it in sync by hand.

More progress on #12081.

Create a capability to generate WORKSPACE files for tests at build time, based on the repository definitions in distdir_deps.bzl.

This makes it possible for the versions of repositories used in tests to align with the versions used a Bazel build time without upddating files scattered throughout the source and test trees.

Demonstrated with rules_cc.

Create a capability to generate WORKSPACE files for tests at build time,
based on the repository definitions in distdir_deps.bzl.

This makes it possible for the versions of repositories used in tests
to align with the versions used a Bazel build time without upddating
files scattered throughout the source and test trees.

Demonstrated with rules_cc.
@google-cla google-cla bot added the cla: yes label Dec 22, 2020
@aiuto aiuto added wip and removed cla: yes labels Dec 22, 2020
@google-cla google-cla bot added the cla: yes label Dec 22, 2020
distdir_deps.bzl Show resolved Hide resolved
distdir_deps.bzl Show resolved Hide resolved
@aiuto
Copy link
Contributor Author

aiuto commented Jan 5, 2021

This PR is unexpectedly difficult to import. It passes all CI from this side, but when imported to Google and reexported it fails to build a correct bazel. That is, the bazel runs, but is missing the cc_configure.WORKSPACE resource. But the strange part is that the generated file is in bazel-distfile.zip and in the deploy jar. And that makes sense, because we should not even be able to build bazel (with bazel) without having that file correctly generated. So my suspicion is that we are building a bootstrap bazel directly from java sources, without bazel - and we are testing with that version, and that process is not actually using distfile.zip, but is instead relying on the github sources. I have more to explore.

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