Hi, On Tue, 2020-11-03 at 18:01 +0900, Tristan Van Berkom wrote: > This proposal consists of a handful of changes, so I will avoid > drilling too deeply into the finer details, but instead try to explain > what these changes are, how they are intertwined, and how they benefit > us.
+1 on the general direction of this proposal. We may have to look at these finer details, though, and how they impact real-world plugins before a final decision. > [...] > > > Early assembly of sandbox commands > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > This will require an API change such that commands should be > constructed early on, probably directly at Plugin.configure() time. > > Element will gain some API for command list to be created early on, and > these commands will be used automatically by the Element base class to > feed into the cache key. I'm definitely interested in the details of these API changes. We should likely cover all of what `configure_sandbox()` currently does and also the output/collect path (currently the return value of `assemble()`). They should affect the cache key and having the output path early may allow optimizations with remote execution. How will these commands interact with custom Python assemble logic? Will there be a public `Element.run_commands()` method, which is called by the default implementation of `Element.assemble()` but plugins can also call it in their `assemble()` override? Or is there no need for such combinations and plugins would choose between running sandbox commands or custom Python assemble logic but never both in the same plugin? Also, will plugins still need access to the `Sandbox` object? Cheers, Jürg
