[Nix-dev] comments on: -r29543 Use ruby 1.9 as the default - renaming files

Shea Levy shea at shealevy.com
Sun Oct 2 22:58:23 CEST 2011


On 10/02/2011 04:43 PM, Marc Weber wrote:
> Hi Shea Levy,
>
> -  ruby18 = callPackage ../development/interpreters/ruby { };
> -  ruby19 = callPackage ../development/interpreters/ruby/ruby-19.nix { };
> -  ruby = ruby18;
> +  ruby18 = callPackage ../development/interpreters/ruby/ruby-18.nix { };
> +  ruby19 = callPackage ../development/interpreters/ruby { };
> +  ruby = ruby19
>
> Don't rename files for the sake of renaming unless there is a strong reason.
> If you want to read history or if you have local changes
> applied to those files this kind of renaming is causing a lot of
> additional work for no extra value. So just *don't* do it.

SVN keeps track of file history across copies (which includes something 
renamed with svn mv, which these files were). The extra value is that 
the semantics we get from file names are actually valid (i.e. that the 
default.nix file is actually the default version), and the extra work 
for maintaining local changes that aren't aware of svn cp is a one-time 
cost.

> Its ok to have
> default.nix containing ruby18 which is no longer the default, isn't it?

No, I don't think it is. It's perhaps ok to have no default.nix at all, 
but if ruby18 is not the default it shouldn't be in default.nix.

> If you have to rename then consider keeping version number in all files
> so that you
>    - know what is contained in a file
>    - you don't have to rename it again when there is a ruby-2.0 version.
>
That's fine with me, but it's not in line with how we generally version 
packages. With the exception of major packages where different versions 
mean significant breakage, default.nix is the latest version and we keep 
around old versions in separate numbered files until they are no longer 
needed.
> If there is a reason which I've missed make me understand your
> reasoning, please.
>
> Marc Weber
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
Cheers,
Shea


More information about the nix-dev mailing list