Replies: 2 comments
-
@cake-build/cake-team thoughts? |
Beta Was this translation helpful? Give feedback.
-
Just jotting down some thoughts on how the UX for recipes could be: A user would setup the recipe in a file, such as cake.exe -recipe setup.cake Recipe FileA file that allows a user to configure the Context objectThis is an object contains state about the current execution; this is things like which BuildSystem, what tools to run, what the target task is, etc. (this is parameters, paths, environment) in Cake.Recipe) Nb: I feel this is perhaps different than the Two Stage compilationA big benefit of a generalisation over a CI (i.e. recipes) is that depending on the context we can pick & choose tasks we want to run. This means we can also determine at the start which addins & tools we need so reduce the footprint of each execution to that required (currently, this isn't possible). However, with the introduction of the Let me elaborate on how see this working out: AddinsTo compile an addin code we need the addin binary available before roslyn compile. Given above design we are now in a position to fully know the addin subsets for our execution which means the emitted script only has the needed addins. I have taken a short hop on how we'll know which addin forms part of the run; we'll have to introduce in load semantics just as Cake TasksLastly, which cake tasks to run is easy as we build on the existing This are some initial thoughts on how we can get to rich APIs for CI/CD. Also, one more thing to note the versions compatible with the Recipe are part of the Recipe so all we need to run is cake.exe - no config (gitversion, cake, nuget, etc). |
Beta Was this translation helpful? Give feedback.
-
I wanted to make a proposal that I think has a lot of potential; I wonder if this has already been considered.
A recipe is a collection of Cake Tasks that execute in a sequence based on some contextual conditions. A classic example is Cake.Recipe which is distributed via nuget and loaded via
#l:nuget=cake.recipe
. This way of loading loads all the cake files found in the package. However, conditionally an execution my only require a smaller subset; eg: version -> build -> test. Loading all of the Cake scripts is costly; especially in the case of addins as all of the addins need to be downloaded. Another crucial part of the recipe is config files such as tools/packages.config & cake.config (to disable verification etc), nuget.config, giversion.yml, etc.Making recipe a first class concept will entail a cake script as:
The new preprocessor directive will download from nuget a package containing cake scripts & config that that particular recipe works with and based on the recipe target ("default" in this case) will load a subset of the cake scripts that are dependent on each other.
Benefits
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions