Update Bazel build rules and remove unmaintained travis config#783
Merged
Conversation
005b6fb to
c4f6625
Compare
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.
See commits on the C++ repo: - google/jsonnet@913281d - google/jsonnet@842d31e
c4f6625 to
923f51b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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).