Repository navigation
api: Export Starlark helpers through namespace structs - #379
Merged
Merged
Conversation
martinpitt
reviewed
Nov 2, 2026
martinpitt
left a comment
Member
There was a problem hiding this comment.
LGTM. Needs a rebase, and I'm really curious how this changes the image contents?
The distribution helpers don't follow the namespace API used elsewhere. Let's expose release and signing key helpers through a struct for each distribution. Signed-off-by: Daan De Meyer <daan@amutable.com>
Shared helpers and the Python and platform APIs still export individual names. Let's export namespace structs and use the existing box facade where the load graph permits it. We also fold the box-hosted Python binary into python.binary() as a box argument, so the python namespace has one binary macro. Signed-off-by: Daan De Meyer <daan@amutable.com>
daandemeyer
force-pushed
the
distribution-api
branch
from
November 2, 2026 11:40
af40ff2 to
113cc2f
Compare
martinpitt
approved these changes
Nov 2, 2026
martinpitt
left a comment
Member
There was a problem hiding this comment.
(Probably needs another push for the updated ARM digests)
The directory uses a plural name while its public namespace is singular. Let's use platform/ for the directory and labels. The labels seed image UUIDs, so let's refresh the x86 and arm64 image digests as well. Signed-off-by: Daan De Meyer <daan@amutable.com>
Python suites require a box even when they only use the standard library. Let's expose python.test() with an optional box and check each suite against the environment it runs in. Signed-off-by: Daan De Meyer <daan@amutable.com>
Generated branch BUCK files load rpm_branch from generated.bzl, which is an implementation module rather than the public rpm facade. Let's add the macro to the facade as rpm.branch and have the importer emit calls to rpm.branch. A BUCK generated before keeps working, since generated.bzl still exports rpm_branch. Signed-off-by: Daan De Meyer <daan@amutable.com>
The BUCK that the importer generates for a branch calls rpm_branch, and nothing calls rpm_package_json. Let's delete it and point the importer comments at rpm.branch. Signed-off-by: Daan De Meyer <daan@amutable.com>
The image facade builds image.ops from thirteen functions that it loads one by one. compose.bzl calls the same functions by their bare names, so each operation has two names. Let's define the ops struct in image.bzl, make the functions private, and have the facade and compose.bzl use the struct. Signed-off-by: Daan De Meyer <daan@amutable.com>
daandemeyer
force-pushed
the
distribution-api
branch
from
November 2, 2026 12:07
113cc2f to
668831b
Compare
Member
Author
|
Failure is a flake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some distribution, Python and platform helpers still export individual
names. Let's export a namespace struct from each public facade and use the
public box facade where it introduces no load cycles. Internal modules and
the dependencies of a facade keep direct imports. The platform directory
matches its singular namespace.
Python suites use python.test(), with an optional box selecting their
interpreter and package environment. The generated type check uses the
same environment. python.binary() takes the same optional box instead of a
separate box_binary macro.
Generated RPM branch BUCK files call rpm.branch from the public facade. The
image layer operations are defined once as the ops struct that the image
facade forwards.
tine buck run tine//tools:checkpasses all 39 test targets.