Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dependent option sets #82915

Merged
merged 2 commits into from
Mar 19, 2020

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