Open oyvindberg opened 1 year ago
GitHub Actions is a poplar tool for "building stuff" which also uses YAML for configuration. Maybe taking inspiration from what it does (or at least from the parts that it does well) would be a smart idea! And this proposal seems to be very similar to GHA :+1:
Yeah I guess it is @sideeffffect :)
I've come to learn to like that format, though it may be more a quality of the tooling rather than the format itself, not sure! Intellij havs some support for it and the feedback loop is not terrible since the runners start running the actions very soon after push.
Intellij havs some support for it
It has support for anything that has a (JSON)Schema, which we have for Bleep, right?
Yes, exactly
I reimported tapir to check out what it looks like now. A lot is great, but a few things aren't.
This particular build is very big, and different parts are cross-compiled to different targets. Supporting exactly this use case is the most difficult thing to handle in the yaml model, precisely because it's very limited. The fact that it is limited/limiting is a feature, but ideally bleep can support exactly the feature set which can make these kind of builds a joy to work with.
1) Duplication of cross project settings
The thing which is difficult to express in the current model is differences between the cross projects for the same project. If you have a big build matrix you currently have to repeat the same lines a bunch of times. The exact incantations can be hidden behind a template, but you still need to extend that template various places.
For instance:
Conditionals
My best idea right now is to introduce some kind of conditional with simple predicate language to express this.
So you may have a project which extends a template with a bunch of cross projects, and you just need to refine the them. A conditional like this can express it much more concisely than before.
It remains to be seen, but I hope we can infer these the same way templates are inferred today in the sbt import.
Conditional templates
This also paves the way for writing more reusable templates, for instance:
Since these are now very general they could be bundled as part of bleep:
Open questions
Definition / refinement of projects in a cross project
I think definition and refinement of cross projects should be separated, because currently you cannot tell what you're looking at.
currently:
When looking at project
a
you cannot tell iffoo
was already defined as a cross project.Refinement can likely be handled by conditionals, but definition should maybe look different. One idea can be to not use templates for that, and define
crossId
s at the top-level.This example assumes continued usage of arbitrarily named
crossId
s. These are flexible because they can be used for anything, like cross-compiling libraries across cats-effect 2 and 3 for instance. A suggestion in #251 was to rather consider the structure of a cross project and name/select it after the versions.