mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Deprecate hacky way of making structured attrs
The method tested for in the previous commit is now deprecated. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
a353b2f4b2
commit
7577d2d3ae
5 changed files with 18 additions and 1 deletions
|
@ -212,6 +212,7 @@ EvalState::EvalState(
|
|||
, sRight(symbols.create("right"))
|
||||
, sWrong(symbols.create("wrong"))
|
||||
, sStructuredAttrs(symbols.create("__structuredAttrs"))
|
||||
, sJson(symbols.create("__json"))
|
||||
, sAllowedReferences(symbols.create("allowedReferences"))
|
||||
, sAllowedRequisites(symbols.create("allowedRequisites"))
|
||||
, sDisallowedReferences(symbols.create("disallowedReferences"))
|
||||
|
|
|
@ -213,7 +213,7 @@ public:
|
|||
const Symbol sWith, sOutPath, sDrvPath, sType, sMeta, sName, sValue,
|
||||
sSystem, sOverrides, sOutputs, sOutputName, sIgnoreNulls,
|
||||
sFile, sLine, sColumn, sFunctor, sToString,
|
||||
sRight, sWrong, sStructuredAttrs,
|
||||
sRight, sWrong, sStructuredAttrs, sJson,
|
||||
sAllowedReferences, sAllowedRequisites, sDisallowedReferences, sDisallowedRequisites,
|
||||
sMaxSize, sMaxClosureSize,
|
||||
sBuilder, sArgs,
|
||||
|
|
|
@ -1427,6 +1427,8 @@ static void derivationStrictInternal(
|
|||
else if (i->name == state.sOutputHashMode) handleHashMode(s);
|
||||
else if (i->name == state.sOutputs)
|
||||
handleOutputs(tokenizeString<Strings>(s));
|
||||
else if (i->name == state.sJson)
|
||||
warn("In derivation '%s': setting structured attributes via '__json' is deprecated, and may be disallowed in future versions of Nix. Set '__structuredAttrs = true' instead.", drvName);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue