Open mightybyte opened 5 years ago
I marked this as stale due to inactivity. → More info
I was recently debugging a problem when some of the dependencies were not propagated in my derivation. And it turned out that it was because I used builtins.split "\n"
to patch something line by line and then I concatenated all of the lines back with builtins.concatStringsSep "\n"
. All the string context is gone after builtins.split
call. Each string in the resulting array has empty string context.
A composition builtins.concatStringsSep "\n"
and builtins.split "\n"
is not really idempotent.
The
context
declared on this line inprim_match
https://github.com/NixOS/nix/blob/master/src/libexpr/primops.cc#L1859
...and passed to
forceString
on the next line is never used. Is this the intended behavior? It seems like this means thatmatch
could match on a path and the path would be lost from the context. So probably a bug?EDIT: This is also true of
prim_split
https://github.com/NixOS/nix/blob/master/src/libexpr/primops.cc#L1899