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

Make the .bzl files available as input to a bzl_library #567

Merged
merged 4 commits into from
Apr 7, 2022

Conversation

aiuto
Copy link
Collaborator

@aiuto aiuto commented Apr 4, 2022

Make the .bzl files available as input to a bzl_library, without having to resort to the invasivness of a shadow tree of just the .bzl files without the other distributable files.

Fixed #565

…ng to resort to the invasivness of a shadow tree of just the .bzl files without the other distributable files.
@achew22
Copy link
Member

achew22 commented Apr 6, 2022

Out of curiosity, why is a shadow tree so onerous? It is how every other language that I'm aware of in the Bazel ecosystem works. Can you help me understand why this is an improvement over the "normal" model of having an x_library with deps on other x_librarys?

pkg/BUILD Show resolved Hide resolved
@aiuto
Copy link
Collaborator Author

aiuto commented Apr 7, 2022

Out of curiosity, why is a shadow tree so onerous? It is how every other language that I'm aware of in the Bazel ecosystem works.

There are a few things I don't like about it.

  • We're not actually happy with the pattern within the Bazel code itself. We're trying to get away from that a bit with the recently added subpackages method.
  • I have to do it twice, once for the sources (including the python) to go in the distribution, and then again for just the .bzl files. The point of this CL is to have one human written mechanism to gather the distribution tree and then a mechanical way to unsure the .bzl files are available.
  • the need for the .bzl files is because of the current implementation of stardoc, not for a conceptual reason. The design we would like to move to is one where bazel directly emits the doc information rather than our standalone parsing. That would change the flavor of the stardoc rule to require only the file you want emitted.

@aiuto aiuto merged commit 76f5651 into bazelbuild:main Apr 7, 2022
@aiuto aiuto deleted the bzl_srcs branch April 7, 2022 16:12
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 this pull request may close these issues.

Make a documentation bzl_library publicly visible
5 participants