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

Add subpackages module to skylib to support new bazel native.subpackages #348

Merged
merged 14 commits into from
Apr 4, 2022

Conversation

kkress
Copy link
Contributor

@kkress kkress commented Jan 28, 2022

This is a stacked PR on top of #347 (commit #1), this should not be merged until that PR is accepted and merged.

This PR adds some simple utility functions for the new native.subpackages loading phase function added to bazel. It allows callers to check for support of the function in bazel before calling and provides some useful utility.

This is a relatively simple addition to unittest that statically creates
rules that either explicitly fail or not depending on if the test case,
evaluated entirely in loading phase, resulted in the expected state or
not.
@RoyMoto
Copy link

RoyMoto commented Feb 3, 2022

I fournd typo.
_SUBACKAGES_SUPPORTED

lib/subpackages.bzl Outdated Show resolved Hide resolved
lib/subpackages.bzl Outdated Show resolved Hide resolved
tests/subpackages_tests.bzl Outdated Show resolved Hide resolved
lib/subpackages.bzl Outdated Show resolved Hide resolved
lib/subpackages.bzl Outdated Show resolved Hide resolved
lib/subpackages.bzl Outdated Show resolved Hide resolved
lib/subpackages.bzl Outdated Show resolved Hide resolved
lib/subpackages.bzl Outdated Show resolved Hide resolved
kkress and others added 7 commits February 10, 2022 11:08
…kages

This adds support for friendly APIs on top of the new native.subpackages
support added to Bazel.  This allows code to use subpackage, if the
Bazel version supports it, test for packages existing and construct
targets based on relative subackages.

This Pull requires support for 'loadingtest' has been added to the
'unittest' module.
@kkress
Copy link
Contributor Author

kkress commented Feb 11, 2022

OK I think that did it, sorry my git/github foo is not great so there are a bunch of commits :/

Copy link
Collaborator

@tetromino tetromino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I had to fix the tests and the BUILD file due to merge conflict.

@tetromino tetromino merged commit cc51024 into bazelbuild:main Apr 4, 2022
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.

3 participants