Add support for composite buildpack targets during publication #221
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.
This PR reads
[[metadata.targets]]
from a composite buildpack'sbuildpack.toml
to determine what targets the composite buildpack is intended to be compiled for.Why
[[metadata.targets]]
?We're not actually sure if
[[targets]]
is legal as a part of a composite buildpack descriptor, so libcnb.rs has not modeled it as noted here:https://github.com/heroku/libcnb.rs/blob/a4e48fde0b502eec1ce1d0b811bb1ac61beed101/libcnb-data/src/buildpack/mod.rs#L182-L185
The multi-platform rfc seems to indicate that this will eventually be part of
package.toml
:https://github.com/buildpacks/rfcs/blob/abd3ba28d7648e03a9c2074a88dae9fe3b069683/text/0000-multiarch-builders-and-package.md?plain=1#L754-L776
But
package.toml
is not a part of the spec, and this field isn't implemented inlibcnb.rs
orpack
yet. Using it now would breakcargo libcnb package
workflows. Setting[[targets]]
inpackage.toml
also seems like something that is an output ofcargo libcnb package
, rather than an input to it.I don't think
metadata.targets
will be permanent, but rather a stopgap until multi-arch support lands inpack
andlibcnb.rs
at a future date.