nix-compat: revisit String usage in Derivation struct

#375
Opened by flokli at 2024-01-31T09·31+00

This came up in cl/10200. It might be possible to produce non-UTF8 environment keys, maybe builder+arguments and system field too.

Every string that should be a StorePath (see b/264) should be fine, as non-UTF8 names in a store path are illegal. This consequently means outputs can't be invalid UTF8 either, as it'd end up in store paths (outputs) too.

We should come up with some cursed examples, and in case it is possible, add them to our testsuite. This also means some of the code in glue that fails on invalid utf8 after cl/10200 would then need to pass along the bytes.

  1. flokli updated the body of this issue at 2024-01-31T09·32+00