[Nix-dev] [Nix-commits] [NixOS/nix] 17dc30: Revert "prim_toPath: Actually make the string a pa...

Shea Levy shea at shealevy.com
Fri Nov 16 00:00:13 CET 2012


On 11/15/2012 05:55 PM, Eelco Dolstra wrote:
> Hi Shea,
>
> On 15/11/12 23:14, Shea Levy wrote:
>
>> I've already fixed this issue in NixOS master, and the usage of toPath was
>> incorrect in that case anyway. Any current uses of toPath aren't getting the
>> desired behavior anyway (and AFAICT never have), so isn't it better to expose
>> these cases where the expression author misunderstood the meaning of toPath and
>> fix the cases where the developer understood correctly?
> Well, this change causes existing code to break.  So you wouldn't be able to
> build old NixOS revisions anymore, which is IMHO a bad thing.
>

Fair enough. Since the desired functionality of toPath can be achieved 
by concatenating the argument with /, I think the best solution is to 
update the nix documentation to say that toPath shouldn't be used, fix 
all known instances of toPath to use / + arg, and possibly add a lvlInfo 
message informing the user of the deprecation. Thoughts?


More information about the nix-dev mailing list