8000 Made version failure message better reflect the issue by jdob · Pull Request #717 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content

Made version failure message better reflect the issue #717

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

Merged
merged 1 commit into from
Jun 1, 2022
Merged

Made version failure message better reflect the issue #717

merged 1 commit into from
Jun 1, 2022

Conversation

jdob
Copy link
Contributor
@jdob jdob commented May 31, 2022

I ran into a sitation that triggered this failure. I have version 5.0.0 installed, so it was confusing to see a message telling me my version was lower than 0.2.1.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:
    Error message clarification.

What is the current behavior?

Issue Number: N/A

I received the following output from a build:

File "/private/var/tmp/_bazel_jdob/300f9ff46946083ee2e5c32c9a7995b7/external/rules_python/third_party/github.com/bazelbuild/bazel-skyli
b/lib/versions.bzl", line 92, column 17, in _check_bazel_version
                fail("Current Bazel version is lower than 0.2.1; expected at least {}".format(
Error in fail: Current Bazel version is lower than 0.2.1; expected at least 4.0.0

Running Bazel shows I have a higher version than 0.2.1:

$ bazel version
Build label: 5.0.0
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Jan 19 14:15:55 2022 (1642601755)
Build timestamp: 1642601755
Build timestamp as int: 1642601755

What is the new behavior?

The error message indicates that the version cannot be determined, rather than the message reflecting an old version.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I ran into a sitation that triggered this failure. I have version 5.0.0 installed, so it was confusing to see a message telling me my version was lower than 0.2.1.
@jdob jdob requested a review from thundergolfer as a code owner May 31, 2022 15:00
@f0rmiga
Copy link
Member
f0rmiga commented Jun 1, 2022

Makes sense. Thanks for the patch.

@f0rmiga f0rmiga merged commit d1d2308 into bazel-contrib:main Jun 1, 2022
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.

2 participants
0