buildpacks / libcnb

A non-opinionated language binding for the Cloud Native Buildpack Buildpack and Extension specifications
Apache License 2.0
31 stars 13 forks source link

Add support for buildpack api 0.8 #131

Closed samj1912 closed 2 years ago

samj1912 commented 2 years ago

Resolves #128

samj1912 commented 2 years ago

Looks good to me.

I'm not 100% sure it's necessary, but my only observation is that in the detect & build tests, we're not testing the case where both args & env variables are set.

I believe that the code is going to take the env variables if both are set. It's an invalid state, so it would seem reasonable if we errored if both are set. I don't know if the platform/lifecycle would allow this (I didn't test), but my line of thinking is that it might be possible for a user to set one of these new env variables on an older platform/lifecycle since the older platform/lifecycle is unaware of them altering the behavior. In this particular case, erroring out would be beneficial.

Even if the user sets this on an older version of the platform/lifecycle, we only source from the env var if the buildpack api >= 0.8.