Open weberc2 opened 4 years ago
One incarnation of this is a "scriptable" plugin that has a "scriptable" target type, a "script" argument (among others), and a build script/function that executes the script. Further, the target type should take dependencies, and the script should be allowed to reference those dependencies (perhaps the target's dependencies
argument is actually a dict whose keys are symbol names and whose values are dependencies such that the script can reference those dependencies by the provided symbol names). The design should make it difficult to access unspecified dependencies (hermeticity). This includes thoughtfulness about the capabilities offered by the standard library.
A concrete use case for this is the candidate non-toy Python example, https://github.com/weberc2/nimbus which includes a code generation step. That project should be able to define a custom script that invokes its codegen package to produce a Python package.
The universe of things that this tool could be used for is vast and it's very likely that any team of any significance will want to implement their own build rules; this should be easy and to the extent possible it should be easy to adhere to the constraints that the first-class plugins adhere to (to preserve hermeticity).