Merge pull request #9755 from 9999years/printer-followup

Printer followup

(cherry picked from commit 51f524c629b778b75cb62a9e0c85bae655984abc)
Change-Id: I29214cc86c5e846cbcfec382022293a70011b316
This commit is contained in:
eldritch horrors 2024-03-08 04:08:08 +01:00
parent 512c1f05c3
commit 7e1f8b09a4

View file

@ -44,9 +44,10 @@ standard input.
> **Warning** > **Warning**
> >
> This option produces ambiguous output which is not suitable for machine > This option produces output which can be parsed as a Nix expression which
> consumption. For example, these two Nix expressions print the same result > will produce a different result than the input expression when evaluated.
> despite having different types: > For example, these two Nix expressions print the same result despite
> having different meaning:
> >
> ```console > ```console
> $ nix-instantiate --eval --expr '{ a = {}; }' > $ nix-instantiate --eval --expr '{ a = {}; }'
@ -179,12 +180,7 @@ $ nix-instantiate --eval --xml --expr '{ x = {}; }'
</attr> </attr>
</attrs> </attrs>
</expr> </expr>
```
Note that `y` is left unevaluated (the XML representation doesnt
attempt to show non-normal forms).
```console
$ nix-instantiate --eval --xml --strict --expr '{ x = {}; }' $ nix-instantiate --eval --xml --strict --expr '{ x = {}; }'
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<expr> <expr>