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

rules_python fails with incompatible_disallow_struct_provider_syntax #1956

Closed
comius opened this issue Jun 13, 2024 · 0 comments · Fixed by #1957
Closed

rules_python fails with incompatible_disallow_struct_provider_syntax #1956

comius opened this issue Jun 13, 2024 · 0 comments · Fixed by #1957

Comments

@comius
Copy link
Contributor

comius commented Jun 13, 2024

🐞 bug report

Affected Rule

Whole repository.

Is this a regression?

It was probably there for a long time. Couple of months ago it was because using protobuf repository. However, last test shows they might have been reintroduced.

Description

Legacy struct provider have been deprecated (that is returning struct from a rule), Python repository is still using it and depends on repositories using them.

bazelbuild/bazel#7347

🔬 Minimal Reproduction

bazel build --incompatible_disallow_struct_provider_syntax //...

🔥 Exception or Error

https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/1808#018e1662-3419-48d7-82fe-fd08e2670eb9



(01:25:03) ERROR: /var/lib/buildkite-agent/builds/bk-docker-mdp7/bazel-org-repo-root/rules_python/tests/base_rules/py_test/BUILD.bazel:18:19: in py_test rule //tests/base_rules/py_test:test_mac_requires_darwin_for_execution_subject:
/var/lib/buildkite-agent/builds/bk-docker-mdp7/bazel-org-repo-root/rules_python/python/private/common/py_executable_bazel.bzl:108:18: Returning a struct from a rule implementation function is deprecated and will be removed soon. It may be temporarily re-enabled by setting --incompatible_disallow_struct_provider_syntax=false . See https://github.com/bazelbuild/bazel/issues/7347 for details.
(01:25:03) ERROR: /var/lib/buildkite-agent/builds/bk-docker-mdp7/bazel-org-repo-root/rules_python/tests/base_rules/py_test/BUILD.bazel:18:19: Analysis of target '//tests/base_rules/py_test:test_mac_requires_darwin_for_execution_subject' failed
(01:25:04) ERROR: Analysis of target '//tests/base_rules/py_test:test_mac_requires_darwin_for_execution' failed; build aborted: Analysis failed
(01:25:04) INFO: Elapsed time: 7.022s, Critical Path: 0.32s
(01:25:04) INFO: 362 processes: 149 remote cache hit, 213 internal.
(01:25:04) ERROR: Build did NOT complete successfully

🌍 Your Environment

Operating System:

Any

Output of bazel version:

The flag has been there since forever :)

Rules_python version:

Head

Anything else relevant?

rules_python are one of the very last users from the repositories we're testing for incompatible changes.

github-merge-queue bot pushed a commit that referenced this issue Jun 13, 2024
Makes `rules_python` compatible with
`--incompatible_disallow_struct_provider_syntax`.

Fixes #1956
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 a pull request may close this issue.

1 participant