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

Adds api to buildpack.toml schema #61

Merged
merged 2 commits into from
Sep 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions buildpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,8 @@ For a given layer, the buildpack MAY specify:
### buildpack.toml (TOML)

```toml
api = "<buildpack api>"

[buildpack]
id = "<buildpack ID>"
name = "<buildpack name>"
Expand Down Expand Up @@ -967,6 +969,13 @@ The buildpack ID:

If an `order` is specified, then `stacks` MUST NOT be specified.

The buildpack API:
- MUST be in form `<major>.<minor>` or `<major>`, where `<major>` is equivalent to `<major>.0`
- MUST describe the implemented buildpack API.
- SHALL indicate compatibility with a given lifecycle according to the following rules:
- When `<major>` is `0`, the buildpack is only compatible with lifecycles implementing that exact buildpack API.
- When `<major>` is greater than `0`, the buildpack is only compatible with lifecycles implementing buildpack API `<major>.<minor>`, where `<major>` of the lifecycle equals `<major>` of the buildpack and `<minor>` of the lifecycle is greater than or equal to `<minor>` of the buildpack.
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean that if you specify api = 1 that it isn't compatible with 1.1 b/c api = 1 is equivalent to api = 1.0?

Copy link
Member Author

Choose a reason for hiding this comment

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

If the buildpack specifies api = 1 it IS compatible with lifecycle where buildpack = 1.1 b/c 1 (the minor of the lifecycle) is greater than or equal to 0 (the implied minor 0 of the buildpack)

Copy link
Member Author

Choose a reason for hiding this comment

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

happy to reword if it's confusing

Copy link
Member

Choose a reason for hiding this comment

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

I think that matches what's written. What about in the inverse case? api = 1.1 would not work on a lifecycle that sets buildpack = 1.0, right?

Copy link
Member

Choose a reason for hiding this comment

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

Just chatted with @ekcasey and she confirmed the above.


#### Buildpack Implementations

A buildpack descriptor that specifies `stacks` MUST describe a buildpack that implements the [Buildpack Interface](#buildpack-interface).
Expand Down