builtins.toXML is missing string context

#398
Opened by qyliss at 2024-04-09T09·59+00

builtins.hasContext (builtins.toXML { 
  inherit (derivation {
    name = "test";
    builder = "/bin/sh";
    system = builtins.currentSystem;
  }) drvPath;
})

True in cppnix; false in tvix.

  1. Note there's no separate XML string output to signal context being present, it's purely in the NixValue itself:

    nix-repl> (builtins.toXML "${./README.md}")
    "<?xml version='1.0' encoding='utf-8'?>\n<expr>\n  <string value=\"/nix/store/p2kp2lkdaavp8lk0gn32ljdbq261jrns-README.md\" />\n</expr>\n"
    

    flokli at 2024-05-20T14·51+00

  2. Fixed in https://cl.tvl.fyi/c/depot/+/11704.

    flokli at 2024-05-23T09·47+00

  3. qyliss closed this issue at 2024-05-23T14·55+00