Properly support different OS versions
This would be very good to have, as having the different branches is a bit of a hassle.
What's most unclear to me is how we can add that to module descriptions.
- Ideally, you would only need to specify things that are different between two OS'es. So I don't want to have one module for Ub18 and one for Ub20, if they are 90% the same, for example.
- Also, the solution should be somewhat universal w.r.t. where you can use it in the module description. (i.e. you can specify special values for OS'es at any point in a module description.
- Finally, I don't want to change the data classes too much unless necessary.
One idea that I have is:
- We have some special syntax in the JSON files to say "This value is different for OS'es", then specify a default and special values for specific OS's.
- We pre-process the JSON file (we do that anyway for comments etc), and when encountering such a symbol, we pick the one corresponding to the current OS.
It could look something like this:
Instead of (without special values)
{
"git": {
"url": "...",
"default_checkout_ref": "main"
}
}
Version 1:
{
"git": {
"url": "...",
"default_checkout_ref": {
"per OS": {
"default": "main",
"ubuntu_20": "ubuntu20"
}
}
}
}
or Version 2:
{
"git": {
"url": "...",
"default_checkout_ref": {
"default": "main",
"ubuntu_20": "ubuntu20"
}
}
}
The second one would be less "clutter" and indirection, but also less unique.
Also, we need constant ID's for different OS's, and need to document them.
@dreher @fabian.reister What do you think about that?