Skip to content

Commit b06017d

Browse files
committed
Revert "move check to DerivationOptions::fromEnv"
This reverts commit 11e04e0.
1 parent 29486ef commit b06017d

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

src/libstore/derivations.cc

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -518,27 +518,6 @@ DerivationOptions DerivationOptions::fromEnv(const StringPairs & env)
518518

519519
DerivationOptions defaults = {};
520520

521-
if (auto structuredAttrs = parsed.getStructuredAttrs()) {
522-
if (get(*structuredAttrs, "allowedReferences")){
523-
warn("'structuredAttrs' disables the effect of the top-level attribute 'allowedReferences'; use 'outputChecks' instead");
524-
}
525-
if (get(*structuredAttrs, "allowedRequisites")){
526-
warn("'structuredAttrs' disables the effect of the top-level attribute 'allowedRequisites'; use 'outputChecks' instead");
527-
}
528-
if (get(*structuredAttrs, "disallowedRequisites")){
529-
warn("'structuredAttrs' disables the effect of the top-level attribute 'disallowedRequisites'; use 'outputChecks' instead");
530-
}
531-
if (get(*structuredAttrs, "disallowedReferences")){
532-
warn("'structuredAttrs' disables the effect of the top-level attribute 'disallowedReferences'; use 'outputChecks' instead");
533-
}
534-
if (get(*structuredAttrs, "maxSize")){
535-
warn("'structuredAttrs' disables the effect of the top-level attribute 'maxSize'; use 'outputChecks' instead");
536-
}
537-
if (get(*structuredAttrs, "maxClosureSize")){
538-
warn("'structuredAttrs' disables the effect of the top-level attribute 'maxClosureSize'; use 'outputChecks' instead");
539-
}
540-
}
541-
542521
return {
543522
.checksPerOutput = parseChecksPerOutput(parsed),
544523
.checksAllOutputs = parsed.getStructuredAttrs()

src/libstore/unix/build/local-derivation-goal.cc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,6 +2889,27 @@ void LocalDerivationGoal::checkOutputs(const std::map<std::string, ValidPathInfo
28892889
checkRefs(checks.disallowedRequisites, false, true);
28902890
};
28912891

2892+
if (auto structuredAttrs = parsedDrv->getStructuredAttrs()) {
2893+
if (get(*structuredAttrs, "allowedReferences")){
2894+
warn("'structuredAttrs' disables the effect of the top-level attribute 'allowedReferences'; use 'outputChecks' instead");
2895+
}
2896+
if (get(*structuredAttrs, "allowedRequisites")){
2897+
warn("'structuredAttrs' disables the effect of the top-level attribute 'allowedRequisites'; use 'outputChecks' instead");
2898+
}
2899+
if (get(*structuredAttrs, "disallowedRequisites")){
2900+
warn("'structuredAttrs' disables the effect of the top-level attribute 'disallowedRequisites'; use 'outputChecks' instead");
2901+
}
2902+
if (get(*structuredAttrs, "disallowedReferences")){
2903+
warn("'structuredAttrs' disables the effect of the top-level attribute 'disallowedReferences'; use 'outputChecks' instead");
2904+
}
2905+
if (get(*structuredAttrs, "maxSize")){
2906+
warn("'structuredAttrs' disables the effect of the top-level attribute 'maxSize'; use 'outputChecks' instead");
2907+
}
2908+
if (get(*structuredAttrs, "maxClosureSize")){
2909+
warn("'structuredAttrs' disables the effect of the top-level attribute 'maxClosureSize'; use 'outputChecks' instead");
2910+
}
2911+
}
2912+
28922913
if (auto outputChecks = get(drv->options.checksPerOutput, outputName))
28932914
applyChecks(*outputChecks);
28942915

0 commit comments

Comments
 (0)