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

Update Bazel build rules and remove unmaintained travis config #783

Merged
merged 6 commits into from
Jan 20, 2025

Conversation

johnbartholomew
Copy link
Collaborator

@johnbartholomew johnbartholomew commented Jan 20, 2025

The Bazel build is broken by some recent Bazel changes. In the C++ repo this was fixed by google/jsonnet#1189, but the Go repo MODULE.bazel references a released version of jsonnet, which doesn't include this.

go-jsonnet build relies on C++ jsonnet in other ways anyway, due to C++ jsonnet being the source of truth for the standard library. The go-jsonnet repo has C++ jsonnet as a git submodule, so we already deal with them being tied together like this. Therefore, let's just make the Bazel build for go-jsonnet refer directly to the specific C++ jsonnet repo commit that we're using for the submodule anyway.

To do this I directly use http_archive to specify cpp_jsonnet as a repository pointing at the archive from github, at the same commit that the submodule is at. They're kept in sync manually (the update_cpp_jsonnet script updates both of them together).

@johnbartholomew johnbartholomew force-pushed the build_cleanup branch 7 times, most recently from 005b6fb to c4f6625 Compare January 20, 2025 21:41
@johnbartholomew johnbartholomew marked this pull request as ready for review January 20, 2025 21:41
It was added in Jan 2020 and apparently has never been updated since
then. It refers to Bazel 1.2.1 which is long out of date (Bazel 5 is
the oldest still maintained version, and Bazel 8 is the current
active version).
As far as I'm aware we use GitHub Actions for our CI needs now.
This changes the bazel module dependencies so that the C++ jsonnet
repo dependency (which is actually used as the source for the
standard library and nothing else in the Bazel build) comes from
a specific commit of the jsonnet repo, rather than depending on
the 'published' jsonnet 0.20.0.

The two repos are tightly coupled anyway so I think this more
accurately reflects the situation. Particularly since the C++ repo
is also linked (at a specific commit) as a git submodule, which
is used for non-Bazel build and testing.
@johnbartholomew johnbartholomew changed the title WIP - Update Bazel build rules and remove unmaintained travis config Update Bazel build rules and remove unmaintained travis config Jan 20, 2025
@johnbartholomew johnbartholomew merged commit 923f51b into google:master Jan 20, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant