Brainstorming for RFC: pname and version

However, as stated in the “Motivation” part of this pre-RFC, builtins.parseDrvName splits the name in the first - before a digit:

nix-repl> builtins.parseDrvName "funny-0.0.0+unstable=2021-10-10"
{ name = "funny"; version = "0.0.0+unstable=2021-10-10"; }
nix-repl> builtins.parseDrvName "funny+unstable=2021-10-10"
{ name = "funny+unstable=2021"; version = "10-10"; }

On the other hand:

Pondering about it, I was cogitating using another “default version for inexistent releases” instead of 0.0.0.

Because of parseDrvName, this default should start with a digit. However, it opens the possibility of this “bug”. Any scenario can happen in the wild: we have beasts from higan-115 (one single number) to armagetronad-0.2.9.1.0 (five numbers).

Elocubrating a bit more, I think we can employ 0_0 for this default. It looks very uncommon; indeed many Nix expressions convert underscores to dots in program’s versions.
I will reedit the link again.

Hey everyone! Come to the playground!

Hi everyone, we are seeing shepherd nominations in “the playground”. Please consider nominating yourself or others.