heroku / libcnb.rs

A framework for writing Cloud Native Buildpacks in Rust
BSD 3-Clause "New" or "Revised" License
34 stars 6 forks source link

[Stacked PR] Schneems/layer output mut #762

Closed schneems closed 7 months ago

schneems commented 7 months ago

Need

I can get info into the layer now that it is mutable, but the result of context.handle_layer is a LayerData which does not retain a reference to the original layer. One option could be making LayerData take two generics instead of one, but this has large API consequences.

schneems commented 7 months ago

Closing this without merging. We've decided to move forward in a different way:

The section_logger renamed inline_output and in this PR changed to a LayerOutput trait is fundamentally a hack. We could continue with this hack by modifying LayerData in such a way that allows us to retrieve a layer once it's done executing.

When we tried this work, it impacts the internals, it impacts the consumers, and ultimately it seems like a lot of work for something we might not ultimately want.

We talked about:

At the end we'll have a new output and layer concept that go hand in hand. We can update the Ruby buildpack using this style to ensure it's suitable for all buildpacks.