-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Add golden tests for public configs #3922
Conversation
abc20e1
to
6f9fbb5
Compare
This should make it much harder for us to miss updates for vscode-haskell as the testdata would be modified since the latest release. For example:
would give us all changes to the public interface. However, this might be really annoying for new plugin maintainers and maybe even release managers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea and I like it.
I would like to do more in this direction, e.g. generate the lists of supported plugins from this and then have a test that the table in the docs agrees and so on. This is a good start, though.
Failures are hard to read, better to use one of the |
I think we probably do want it to be the case that our "plugin support matrix" varies across the "GHC version" axis but not the "platform" axis. That would just be too much. |
I also don't think our plugin support matrix should be even allowed to be different per platform. A plugin that only works on a certain platform feels like a bad user experience. |
6f9fbb5
to
098218a
Compare
Changes to the vscode schema need to be communicated to vscode-haskell plugin maintainers, otherwise users can't make use of the new configurations. In general, changes to the schema need to be done consciously when new plugin or features are added. We add these golden tests as an additional contract to inform relevant parties whenever the configs change. To fix a failing of these tests, review the change. If it is expected, accept the change via: TASTY_PATTERN="generate schema" cabal test func-test --test-options=--accept As changes need to be applied for all GHC version specific configs, you either need to run this command for each GHC version that is affected by the config change, or manually add the change to all other golden config files. Likely, the easiest way is to run CI and apply the generated diffs manually.
098218a
to
eb2a0a2
Compare
Changes to the vscode schema need to be communicated to vscode-haskell plugin maintainers, otherwise users can't make use of the new configurations.
In general, changes to the schema need to be done consciously when new plugin or features are added. We add these golden tests as an additional contract to inform relevant parties whenever the configs change.
To fix a failing of these tests, review the change. If it is expected, accept the change via:
As changes need to be applied for all GHC version specific configs, you either need to run this command for each GHC version that is affected by the config change, or manually add the change to all other golden config files. Likely, the easiest way is to run CI and apply the generated diffs manually.