Support jq on arm64 linux
The last official jq release, and the one these rules are currently using, was released in 2018, it sounds like the project is still alive https://github.com/stedolan/jq/issues/2305 but changes aren't happening quickly. There are some upstream issues around providing binaries for arm64 linux https://github.com/stedolan/jq/issues/1655, but so far there aren't any hosted binaries we can easily download for this.
One option to solving this would be to build jq with bazel instead of vendoring binaries. A quick google came up with these BUILD files https://github.com/attilaolah/bazel-tools/blob/master/jq.bazel which I have not tested. Another option would just be to build an arm64 binary from the last release tag and host it somewhere (like on the releases page of this repo), just to have a usable download.
Note that our yq toolchain has an arm64 binary. Yq is supports json and is a superset of jq.
Idea; https://wapm.io/syrusakbary/jq has jq as a wasm binary and can run anywhere wasmer can run which is basically every nix platform plus windows. wasmer can be introduced as a toolchain and jq ran with it.
That sounds like a bit of overhead? i think the worst case alternative is we build jq manually, or host our own binary for that case?
That sounds like a bit of overhead?
I strongly agree. If we delegate "building from the source part" to the users, then it's a viable choice. I am not a huge fan of taking another ruleset as a dependency, just to build from the source.
Jq arm64 linux support will be in the 2.0.0 release.
Jq arm64 linux support will be in the 2.0.0 release.
Is there an issue tracking this somewhere? I found https://github.com/jqlang/jq/issues/2386, which has a 1.7 milestone, and https://github.com/jqlang/jq/issues/2459, which doesn't have any milestone.
I'm trying to figure out what's necessary for https://github.com/bazel-contrib/rules_oci/issues/253 to be fixed.
https://github.com/jqlang/jq/releases/tag/jq-1.7 is the available binaries as part of 1.7 release. i believe we are waiting for 2.0 release to make this breaking change.
Ah, so 2.0 of bazel-lib? What makes this a breaking change?
Ah, so 2.0 of bazel-lib? What makes this a breaking change?
Yup. We're planning to cut a bazel-lib 2.0 release in mid-late October. There were a couple of breaking changes:
- A jq flag we were relying on for stamping support was removed, so we had to make a change that would break consumers who were stamping with jq.
- The naming convention for the jq binaries changed, so rather than supporting pre-1.7 conventions we decided to drop them and only support 1.7+ going forward.
You can see the changes here: https://github.com/aspect-build/bazel-lib/pull/520
Closing now that 2.0 is released: https://github.com/aspect-build/bazel-lib/releases/tag/v2.0.0