bleep icon indicating copy to clipboard operation
bleep copied to clipboard

Build variants as first class concept

Open oyvindberg opened this issue 2 years ago • 2 comments

I think this direction with build variants produced by build rewrites is fairly promising, in that the builds are immutable (deriving a new build doesn't change the original build), and you have an original build which makes sense without the rewrites.

If we end up needing all this power, we could in theory lift the build variants into the build file as a first class thing:

build-variants:
  gpu: scripts/com.foo.ApplyGpuBuildRewrite 
projects: ...

ApplyGpuBuildRewrite would produce a new build variant output as yaml to stdout for instance. Then you could tell bleep something like bleep --variant gpu compile, and it would pick that build variant. There would just be some bookkeeping with running the script, caching the output, invalidating on changes to scripts sources and so on.

Thoughts? :)

Originally posted by @oyvindberg in https://github.com/oyvindberg/bleep/issues/250#issuecomment-1368116185

oyvindberg avatar Jan 03 '23 00:01 oyvindberg

That's interesting. So would bleep setup-ide --variant myVariant work ? Would you approve the possibility of a "default" variant that'd be automatically applied when setting up the ide. I'm thinking about the problem of facilitating the work setup of teammates who are gonna have a hard time getting used to another build tool ?

Baccata avatar Jan 03 '23 08:01 Baccata

So would bleep setup-ide --variant myVariant work

👍

Would you approve the possibility of a "default" variant that'd be automatically applied when setting up the ide

Yep, just don't specify a build variant, just like today.

oyvindberg avatar Jan 03 '23 18:01 oyvindberg