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

Stardoc with Bazel 7.4 / 7.5 fails on attr.string_keyed_label_dict. #277

Open
r0bobo opened this issue Jan 24, 2025 · 5 comments
Open

Stardoc with Bazel 7.4 / 7.5 fails on attr.string_keyed_label_dict. #277

r0bobo opened this issue Jan 24, 2025 · 5 comments
Assignees

Comments

@r0bobo
Copy link

r0bobo commented Jan 24, 2025

It seems like stardoc doesn't support the string_keyed_label_dict attribute.
I get errors like this if I try to generate documentation for rules with that attribute type.

ERROR: /.../BUILD.bazel:15:23: in starlark_doc_extract rule //bazel/docs:foo.extract: in rule bar attribute baz: unsupported type DictType
ERROR: /.../BUILD.bazel:15:23: Analysis of target '//bazel/docs:foo.extract' failed
@tetromino
Copy link
Collaborator

tetromino commented Jan 24, 2025

Thanks. Confirming. Unfortunately, fixing this requires changes in both Bazel (hopefully we can get this into Bazel 8.1.0) and Stardoc :/

CC @lberki

@tetromino
Copy link
Collaborator

tetromino commented Jan 24, 2025

Actually, not confirming, this should have been fixed already by bazelbuild/bazel@1ce4ab1 which is part of Bazel 8.0.0 and higher.

@r0bobo - which version of Bazel and Stardoc are you using where you see these symptoms?

@tetromino
Copy link
Collaborator

tetromino commented Jan 24, 2025

I see now, the issue was introduced by bazelbuild/bazel#23998 - the string_keyed_label_dict was cherry-picked back into Bazel 7.4, but the corresponding changes for doc extraction were not cherry-picked; and since the updated tests for doc extraction weren't cherrypicked into 7.4 either, the cherry-pickers did not realize the problem :/

@tetromino tetromino changed the title Support attr.string_keyed_label_dict. Stardoc with Bazel 7.4 / 7.5 fails on attr.string_keyed_label_dict. Jan 24, 2025
@r0bobo
Copy link
Author

r0bobo commented Jan 25, 2025

I see now, the issue was introduced by bazelbuild/bazel#23998 - the string_keyed_label_dict was cherry-picked back into Bazel 7.4, but the corresponding changes for doc extraction were not cherry-picked; and since the updated tests for doc extraction weren't cherrypicked into 7.4 either, the cherry-pickers did not realize the problem :/

Aha ok! Yeah, you're right. I'm on Bazel 7.4.1 / Stardoc 0.8.0. I will hopefully manage to upgrade to Bazel 8.x soon anyway. :)

@r0bobo
Copy link
Author

r0bobo commented Jan 25, 2025

(I see that it might get cherrypicked into 7.5 as well from the PR you linked.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants