bazelbuild / bazelbuild/bazel

FR: version string convention to signify patched Bazel binary

Open
#10,040 1 comment 0 reactions 0 assignees View on GitHub
area-EngProd help wanted P3 team-Documentation team-OSS type: documentation (cleanup)
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the problem / feature request:

I am requesting a documented convention which allows vendors to tag their builds of Bazel. Rule authors should then accommodate those conventions when conditioning code on Bazel's `native.bazel_version`.

### Feature requests: what underlying problem are you trying to solve with this feature?

We backport patches from master, apply pending PRs, etc. to our internal builds of Bazel. To indicate to our users that they're not using vanilla Bazel, we append a `+vmware` to the version string:

```console
$ bazel version
Starting local Bazel server and connecting to it...
Build label: 0.28.1+vmware
...
```

We now have users trying to use rules_nodejs, but their builds are failing because rules_nodejs has logic to parse Bazel's version, and it's choking on our `+vmware` suffix. Our options are now to either stop vendor-stamping our builds, or to (locally) patch rules_nodejs to ignore `+...`. I would prefer to adhere to a shared convention such that, after adjusting our stamping process to match said convention, we could instead submit a PR to rules_nodejs so that it supports the same scheme as well.

### Have you found anything relevant by searching the web?

No.

I hadn't even heard of `native.bazel_version` until encountering its use in rules_nodejs. AFAICT it's undocumented on docs.bazel.build.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the version output from `bazel version`, the `native.bazel_version` usage described in the issue, and the relevant rules_nodejs version-parsing logic. Check the existing Bazel documentation on docs.bazel.build. Done means a documented vendor-build version convention exists and rule authors can reliably condition on patched Bazel versions.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.