lib: move enableExceptInTests impl to build.test option
#3952
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
enableExceptInTestsimpl tobuild.testoptionMotivated by #3951 and similar instances of
enableExceptInTestsnot working well with our less-abstracted APIs.Simplify the
enableExceptInTestsattribute, removing the_nixvimTestsargument.We now do a full re-eval of the nixvim configuration before building the test, giving us a central place to implement
enableExceptInTestsand its eventual replacement(s).This extends support for
enableExceptInTeststo all methods of getting a nixvim test derivation. Previously, it only worked when usingmkTestDerivationFromNixvimModuleand it only worked forhelpers, notlib.nixvim.I'm a bit concerned about the re-eval increasing out buildbot load. But I can't see an alternative way to achieve a "we are in test mode now" without things getting messy.
Maybe we could have it so that the
build.testoption only usesextendModuleswhen not already in "test mode"? That way our test suite could explicitly set test mode on the initial eval, with no re-eval needed...