chore: add xtask to download regression tests#482
Merged
kodiakhq[bot] merged 8 commits intosbdchd:masterfrom May 20, 2025
Merged
chore: add xtask to download regression tests#482kodiakhq[bot] merged 8 commits intosbdchd:masterfrom
kodiakhq[bot] merged 8 commits intosbdchd:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
EDIT: Removed the tests - this PR is just the
xtasknow :) can't tag you as a reviewer for some reason, but this is ready @sbdchdadds the postgress regression test suite to stress-test the parser:
xtaskthat downloads and preprocesses the sql files from the postgres reposquawk_parsercrate that runs all of them through the parserIn the preprocessing step, we remove everything that we do not want to support (yet), mainly plpgsql commands such as
\gset.Right now, all test fail. I peeked through some of the tests and it's mainly due to
:namevars. I think it makes sense to lex them asIDENTtokens? Happy to add support for this.Overall I think this test suite can help stabilise the parser. My hope is that it becomes stable enough to replace
libpg_queryin the postgres language server.Also: not sure where to put the tests since currently they all are part of the crate itself. For this kind of tests, I usually integrate them as integration tests. Let me know what you prefer! :)
also happy to not add them at all, or maybe not do snapshot testing, or maybe download the files and run the tests on-demand to not pollute the codebase! maybe a separate xtask that can be executed on-demand in CI / locally makes sense too - like https://areweturboyet.com