Fwd: Re: [Nix-dev] [PATCH] t/allow-arbitrary-strinsg-in-names
Marc Weber
marco-oweber at gmx.de
Tue Jul 20 19:35:51 CEST 2010
Excerpts from Jeff Johnson's message of Tue Jul 20 18:58:07 +0200 2010:
> Exposing whitespace in file names just asks for a whopping
> amount of scripting breakage. Your patch (assuming correct)
> is the entry point for a world of tedium.
Hi Jeff,
keep in mind that we're not talking about a universal language such as
/bin/sh which is used in git. We're talking about the DSL Nix with
limited scope.
I only care about being able to use these additional chars
"-.0123456789" so that I can encode package names including versions.
let attrs = {
git-1.8 : { src = fetchurl .. };
git-2.0.RC5 : { src = fetchurl .. };
};
looks fine to me. So maybe this should be allowed when parsing attr
names as well?
The "." char conflicts with selecting attr values:
attrs.git-1.8.src
attrs.git-1.8.RC5.rsc (??)
I choose the string quoting because everybody is familiar with it.
I choose the "space in name" example only to illustrate the string
encoding. I don't expect anybody using a space. So I didn't even think
about it neither do I think its worth adding restrictions.
Is adding more code to the parser / lexer worth being able to write the
git example as shown above?
Marc Weber`
More information about the nix-dev
mailing list