1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 06:11:46 +02:00

Restore ambiguous value printer for nix-instantiate

The Nix team has requested that this output format remain unchanged.
I've added a warning to the man page explaining that `nix-instantiate
--eval` output will not parse correctly in many situations.
This commit is contained in:
Rebecca Turner 2024-01-09 11:13:45 -08:00
parent 0fa08b4516
commit df84dd4d8d
No known key found for this signature in database
6 changed files with 189 additions and 26 deletions

View file

@ -108,8 +108,7 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
environment. */
auto manifestFile = ({
std::ostringstream str;
std::set<const void *> seen;
printAmbiguous(manifest, state.symbols, str, &seen, std::numeric_limits<int>::max());
printAmbiguous(manifest, state.symbols, str, nullptr, std::numeric_limits<int>::max());
// TODO with C++20 we can use str.view() instead and avoid copy.
std::string str2 = str.str();
StringSource source { str2 };