Skip to content

Fix dependent option sets#82915

Merged
roberth merged 2 commits intoNixOS:masterfrom
infinisil:fix-infrec-dependent-option-sets
Mar 19, 2020
Merged

Fix dependent option sets#82915
roberth merged 2 commits intoNixOS:masterfrom
infinisil:fix-infrec-dependent-option-sets

Conversation

@infinisil
Copy link
Member

Motivation for this change

As I learned from a report from @arcnmx, 15c873b from #82751 gives infinite recursion for option-dependent configuration with optionalAttrs, but only with nested option sets. #82802 only added tests for the non-nested case, which is why currently all tests still pass.

In this PR I revert the problematic commit and extend @roberth's tests to check for nested options as well, which would fail if the commit wasn't reverted.

Things done
  • Ran ./modules.sh successfully

… option set"

This reverts commit 15c873b.

This was causing infinite recursion when depending on nested options
@infinisil infinisil requested review from edolstra and nbp as code owners March 19, 2020 02:58
@infinisil infinisil added the 6.topic: module system About "NixOS" module system internals label Mar 19, 2020
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 19, 2020
@arcnmx
Copy link
Member

arcnmx commented Mar 19, 2020

Can confirm my nixos config evaluates again with this PR, thanks!

@roberth roberth changed the title Fix infrec dependent option sets Fix dependent option sets Mar 19, 2020
@roberth roberth merged commit 883879e into NixOS:master Mar 19, 2020
@roberth
Copy link
Member

roberth commented Mar 19, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: module system About "NixOS" module system internals 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants