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

tests: replace helpers.enableExceptInTests with module option #2047

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

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