From 7e422397b47a1fc925301f04b61df939c1c2487f Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Wed, 5 May 2021 16:50:15 +0100 Subject: [PATCH] Add examples for build-write flag and add a caveat Signed-off-by: Sambhav Kothari --- text/0000-build-write-flag.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/text/0000-build-write-flag.md b/text/0000-build-write-flag.md index 8248f82ce..e1f2d206b 100644 --- a/text/0000-build-write-flag.md +++ b/text/0000-build-write-flag.md @@ -49,6 +49,10 @@ There are various use cases when you may want a common workspace that multiple b In such a case a buildpack could provide a layer that is marked as `build-writable` i.e. subsequent buildpacks can modify its contents and the final state of the layer at the end of the build process is what is exported out. +One example might be an Android SDK buildpack that sets up ANDROID_SDK_ROOT (pointing to a layer), which a Gradle buildpack may later write into when gradle runs. + +Another example can be a CCache buildpack that sets up `CCACHE_DIR` (pointing to a layer), which a CMake buildpack may use for its build cache. + ## What is the expected outcome? The spec and lifecycle is modified to support the above use cases. @@ -68,7 +72,8 @@ The lifecycle will have to layerize the layers marked `build-write` as `false` d # Drawbacks [drawbacks]: #drawbacks -Possibly mixing the concerns of the `build` and the `export` phases. +- Possibly mixing the concerns of the `build` and the `export` phases. +- Added complexity of more flags for users. # Alternatives [alternatives]: #alternatives