-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Hello,
There are two kinds of recipes, those which are embedded in a project, and those which belong in their own repository. I'll call the former in-source recipes and the latter out-of-source recipes.
I've been having problems with in-sources recipes lately, so I wanted to share my thoughts about them.
Out-of-source recipes
Those are the most commonly found, especially in OSS (e.g. bincrafters), and they have some strong advantages.
Every release can be packaged
It is possible to go all the way back in a project's release history, and package each release without interfering with upstream at all.
Recipe bug-fixes do not require a new upstream's release
Instead, you have to push a new recipe revision, which has no impact on upstream.
In-source recipes
The biggest advantage of in-source recipes is the possibility to develop the project and package it at the same time, which can be time saving especially when dealing with CI. Indeed, one can build, test, and package at the same time.
However, it has a big drawback:
Recipes bug-fixes require a new release
When the packaging files are part of the project, releasing a recipe bug-fix is no longer trivial.
The buggy recipe is tagged alongside the rest of the project, thus being carved into immaterial stone. Even if it has no impact on the real code!
So what can you do? Make a new release only containing the recipe fix?
It works, but it's a lot of noise for the users (not even mentioning those who do not use Conan), even more when there are more discovered recipe bugs.
Unfortunately, that's what we're doing at work at the moment.
Possible solution
I really think development and packaging should be separate processes, for the reasons I've briefly mentioned above.
The first thing I thought about was to have two recipes. An in-source one for development, used to resolve deps and build easily (i.e. local workflow), and an out-of-source one for packaging.
Unfortunately, this duplicates quite a lof of information (e.g. about requirements), which increases the risk of having mismatches between both.
And it gets worse when a project uses workspaces, because you end up with N in-source recipes...
Does someone have a magical solution for this? 😄