-
Notifications
You must be signed in to change notification settings - Fork 45
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 crashes when interacting with apple_common
global
#76
Comments
There are two bugs here. The first is that the error message is terrible: instead of showing you the names of various Java functions inside Skydoc, it should report the Starlark stack and (crucially) the error message. The second bug is that the failure, of the https://github.com/bazelbuild/bazel/blob/750c938ad180d69cce95af704738360677269d85/src/main/java/com/google/devtools/build/skydoc/fakebuildapi/apple/FakeAppleCommon.java#L62 The solution to the first bug is to change the exception handling in skydoc. The solution to the second is to reimplement skydoc as a client of bazel query, which would load .bzl files and print information about them so that skydoc doesn't need all this fakery. As a short-term hack, one could modify the fake environment, but this is only postponing the inevitable. |
Is the plan to reimplement stardoc as a client of bazel query something that's being actively worked on? Or, is it on a roadmap? If not, we may want to modify the fake environment regardless. It's a quick change. |
@c-parsons I'm not sure exactly how one would go about doing that. I presume this is the fake that would need to be modified. More specifically, I'm not sure why this line is insufficient? |
Friendly ping |
Even friendlier ping |
It's on the roadmap, but it's blocked behind several other changes, so it won't happen for a while. Modifying the fake environment is the expedient move. |
Yes, particularly this demonstrates how one should return a non-empty struct for
Lets consider the evaluation of |
See bazelbuild/stardoc#76 for more information.
See bazelbuild/stardoc#76 for more information.
@c-parsons is this what you were expecting bazelbuild/bazel#12383? |
Friendly ping @c-parsons |
See bazelbuild/stardoc#76 for more information. Closes #12383. PiperOrigin-RevId: 341621899
Related issue: #83 Apologies that response has been so slow on this issue. |
…lable * When available (i.e. in Bazel 7, or in current development Bazel at HEAD), try use the `starlark_doc_extract` native rule for doc extraction instead of the legacy pre-built extraction jar. This behavior can be disabled by passing `use_starlark_doc_extract = False` to the `stardoc` macro. * Add templates and markdown rendering functionality for repository rule and module extension info protos (which are output by `starlark_doc_extract`). * Temporary wart: for module extensions, by default we would want the summary blurb to look something like ``` my_ext = use_extension("@my_local_repo//some:file.bzl", "my_ext") my_ext.tag(foo, bar) ``` but alas, we don't have a good way to get the name of the local repo from Starlark when bzlmod is enabled. * ... and of course, update tests. Which means in some cases, we have to fork the golden files into current (i.e. `starlark_doc_extract`-enabled) and legacy flavors. Fixes #69 Fixes #76 Fixes #81 Fixes #123
When Stardoc encounters the following bit of code in
rules_go
,it throws the following error:
To view, clone, and test this change, please see my CL to be: https://github.com/achew22/rules_go/pull/new/stardoc
and
bazel build //go:def-docs
The text was updated successfully, but these errors were encountered: