-
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
deps in bzl_library() incorrect handled in stardoc() #72
Comments
How about:
with:
This is close to your first example, except that macro-code is depending on macro-deps via It's indeed unfortunate that one needs to specify macro-code as an input and separately as an entry in |
Thanks for the proposal :-) but I don't get that working either. :-( ERROR:docs/BUILD:3:8: in input attribute of stardoc rule //docs:config-bool-docs: '//macro:config-code' must produce a single file |
Whoops. I guess you need:
(You'll need to export We should definitely clean this up, but this should solve the issue that the |
We wanted to avoid to also make an export of It seems like the Thanks for the attention, it's appreciated! :-) |
While I wouldn't go so far to say current behavior is "incorrect," I agree that Stardoc ought accept multiple inputs (a bzl_library) and produce multiple outputs. This is the most natural way to think about it....I've got this Starlark library that I want to document. |
I can't see why Stardoc shouldn't follow the same behavior as Bazel does for transitive dependencies?! |
We have a structure similar to this:
The
macro.bzl
usestring_flag()
and therefore have this load statement.To be able to generate documentation for the macros in
macro.bzl
we must take care of the dependency so we have made 2
bzl_library()
targets inmacro/BUILD
:In
BUILD
belowdocs
we have gathered allstardoc()
rules.For the macro above we have the following rule:
This works BUT what we actually would like to have is this:
macro/BUILD
:And in
docs/BUILD
:So that we have the
deps
inmacro-code
target instead of thestardoc()
target.Shouldn't that work?
It doesn't build but I think that it should and that this is a bug.
It doesn't follow the usual Bazel way of treating the dependencies
As stated above in
docs/BUILD
we have gathered allstardoc()
rules (also for more than the abovedocs/macro
) .We think that all dependencies should be stated in
BUILD's
where we have the code and thoseBUILD's
shall provide the publicbzl_library()
targets that can be used in thestardoc()
rules indocs/BUILD
. The targets belowdocs
should not need to keep track of the dependencies.The text was updated successfully, but these errors were encountered: