tests: fix tests by enabling wrapRc#2076
Conversation
|
EDIT: resolved in #2078 Details
A ton of tests are failing with |
4d012f8 to
c32abfa
Compare
| "mkTestDerivationFromNixvimModule: the `dontRun` argument is deprecated. You should use the `test.runNvim` module option instead." | ||
| { config.test.runNvim = !dontRun; } | ||
| )) | ||
| { wrapRc = true; } |
There was a problem hiding this comment.
Should this also be included in the .extend {} in mkTestDerivationFromNvim above?
We don't use that function internally, and anyone downstream should already have a wrapped RC because their nvim will have been built by the standalone wrapper, so it's probably not strictly necessary there...
There was a problem hiding this comment.
I don't really see how you would be able to call that function without having a standalone module
There was a problem hiding this comment.
They could use evalNixvim, if if they're really fancy they could manually call evalModules.
More reasonably, a home-manager user could decide to use the config.programs.nixvim.test.derivation from their home-manager configuration.
There was a problem hiding this comment.
Ah my mistake, I was talking about how they could get the test without using either of these functions...
You're right, regarding my original comment. It's very unlikely they'd get a standalone nixvim derivation without using the standalone wrapper!
Since cbd1003 I'm able to add _some_ invalid config definitions to modules the tests are using and get no build error. For example `extraConfigLua = null;` should produce an invalid type error, but doesn't. One less visible change in that commit is the move away from using the "standalone" wrapper (`makeNixvimWithModule`), which implicitly sets `wrapRc = true`. Adding back `wrapRc` to the tests seems to fix the issue, however this makes me wonder if there's an underlying issue with wrapping/not-wrapping? Perhaps we've simply uncovered a long-standing eval issue that is masked over by using `wrapRc`?
5465e0d to
9af4c39
Compare
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyDetailsThe pull request has been merged automatically at 9af4c39 |
Adds a regression test for nix-community#2076. This test ensures that `extraConfigLua` is used in `finalPackage` and that the test will fail correctly when running `nvim` results in unexpected output.
Adds a regression test for nix-community#2076. This test ensures that `extraConfigLua` is used in `finalPackage` and that the test will fail correctly when running `nvim` results in unexpected output.
Since cbd1003 I'm able to add some invalid config definitions to modules the tests are using and get no build error.
For example
extraConfigLua = null;should produce an invalid type error, but doesn't.One less visible change in that commit is the move away from using the "standalone" wrapper (
makeNixvimWithModule), which implicitly setswrapRc = true.Adding back
wrapRcto the tests seems to fix the issue, however this makes me wonder if there's an underlying issue with wrapping/not-wrapping?Perhaps we've simply uncovered a long-standing eval issue that is masked over by using
wrapRc?