Skip to content

Conversation

@MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented Aug 20, 2024

As discussed on matrix, the current helpers.enableExceptInTests is problematic for a couple reasons:

  • It only works with mkTestDerivationFromNixvimModule, not mkTestDerivationFromNvim
  • We need to tell helpers whether or not it'll be used for tests

This resolves those, however it has its own issues:

  • mkTestDerivationFromNvim effectively evaluates the modules twice (once before being called, then again internally)
    • I guess this is no different from evaluating a standalone build in one place and then again separately using mkTestDerivationFromNixvimModule
  • If tests: move derivation to module-option & minor cleanup #1989 is merged, users can bypass the test helpers and access config.test.derivation directly anyway
  • enableExceptInTests is removed immediately, with no grace period for the deprecation

I wonder if it'd be better to not provide any direct support for distinguishing between test/non-test contexts?

Or perhaps we should double down on the evalNixvimTest function proposed in #1989's description and use that to set the context?

See #1095

@khaneliman khaneliman marked this pull request as draft January 31, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant