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

Bazel prerelease binary does not check .bazelversion, bazel from prerelease installer does check .bazelversion #18855

Closed
ahumesky opened this issue Jul 7, 2023 · 2 comments
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged

Comments

@ahumesky
Copy link
Contributor

ahumesky commented Jul 7, 2023

Description of the bug:

The bazel prerelease binary does not check .bazelversion, but a bazel installed from the prerelease installer does check .bazelversion. It seems the behavior should be consistent (presumably the binary from the prerelease installer should not be checking .bazelversion -- but maybe the prerelease binary not checking .bazelversion is the bug)

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

cd /tmp
mkdir test-bazelversion
cd test-bazelversion
touch WORKSPACE
echo 6.2.1 > .bazelversion

# standalone binary does not check .bazelversion
wget https://github.com/bazelbuild/bazel/releases/download/7.0.0-pre.20230530.3/bazel-7.0.0-pre.20230530.3-linux-x86_64
chmod +x bazel-7.0.0-pre.20230530.3-linux-x86_64 
./bazel-7.0.0-pre.20230530.3-linux-x86_64 version

# installed binary checks .bazelversion
wget https://github.com/bazelbuild/bazel/releases/download/7.0.0-pre.20230530.3/bazel-7.0.0-pre.20230530.3-installer-linux-x86_64.sh
chmod +x bazel-7.0.0-pre.20230530.3-installer-linux-x86_64.sh 
sudo ./bazel-7.0.0-pre.20230530.3-installer-linux-x86_64.sh 
bazel version

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@sgowroji sgowroji added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jul 7, 2023
@meisterT
Copy link
Member

cc @fweikert

@meteorcloudy
Copy link
Member

The Bazel installer for Linux actually install a wrapper script as bazel, the logic to check .bazelversion is implemented in this script. When you use the pure Bazel binary, .bazelversion is not read since Bazel itself shouldn't do the job of Bazelisk. So this is work as intended.

@brentleyjones brentleyjones closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged
Projects
None yet
Development

No branches or pull requests

6 participants