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

version_repo is not updated when Bazel version changes #25

Closed
meteorcloudy opened this issue Nov 8, 2023 · 5 comments · Fixed by #26 or bazelbuild/rules_go#3747
Closed

version_repo is not updated when Bazel version changes #25

meteorcloudy opened this issue Nov 8, 2023 · 5 comments · Fixed by #26 or bazelbuild/rules_go#3747

Comments

@meteorcloudy
Copy link
Collaborator

When switching the Bazel version, the bazel_features_version repo generated by

version_repo = repository_rule(_version_repo_impl)
won't be automatically updated, which could result wrong feature detection result.

@meteorcloudy
Copy link
Collaborator Author

/cc @fmeum @Wyverald

@meteorcloudy
Copy link
Collaborator Author

I was switching between 6.4.0rc3 and 6.4.0.

@fmeum
Copy link
Member

fmeum commented Nov 8, 2023

We could replace https://github.com/bazelbuild/bazel/blob/dc4f54f9c57a27b68ae0e8c0d21ad3cb68a3dc44/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java#L363 with a regular struct field method that tracks whether a repository rule invoked it and then adds the return value to the marker file.

@fmeum
Copy link
Member

fmeum commented Nov 8, 2023

This would be difficult, but I think there is a much simpler solution: #26

meteorcloudy pushed a commit that referenced this issue Nov 8, 2023
Since every version change requires a server restart, it suffices to
mark the version-dependent repos as `local`.

Fixes #25
@meteorcloudy
Copy link
Collaborator Author

Yeah, the new solution is also better since it works for existing Bazel versions! Thank you!!

fmeum added a commit to bazelbuild/rules_go that referenced this issue Nov 8, 2023
fmeum added a commit to bazelbuild/rules_go that referenced this issue Nov 8, 2023
fmeum added a commit to bazelbuild/rules_go that referenced this issue Nov 8, 2023
copybara-service bot pushed a commit to bazelbuild/bazel that referenced this issue Jan 26, 2024
We need to update rules_python to make sure a newer version of bazel_features is fetched with fixes for bazel-contrib/bazel_features#25

PiperOrigin-RevId: 601806824
Change-Id: I48f87cbbc1d71e884452b4100bc0582293fbf8b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants