Skip to content

Fix test_flatten_grammar_with_recursive_inline_variable#4404

Merged
clason merged 1 commit intotree-sitter:masterfrom
jamessan:generate-test-failure
Jun 6, 2025
Merged

Fix test_flatten_grammar_with_recursive_inline_variable#4404
clason merged 1 commit intotree-sitter:masterfrom
jamessan:generate-test-failure

Conversation

@jamessan
Copy link
Contributor

The thiserror refactor in #4048 dropped the period in the message for FlattenGrammar::RecursiveInline.

Due to this, the test_flatten_grammar_with_recursive_inline_variable has been failing since.

Restore the period to the error message to fix the test and add testing of tree-sitter-grammar to CI to avoid future regressions. This adds at most 15s to each platform that runs the tests.

I wasn't sure if there was a reason why the "test" xtask wasn't being used to test, so I took the conservative approach of just adding explicit testing for tree-sitter-grammar.

@amaanq
Copy link
Member

amaanq commented Apr 28, 2025

Oh wow, good catch. The generate crate's tests should be running, but isn't since we didn't pass in --all to cargo in the test xtask. I'll fix this up (I would rather remove the period in the test)

@amaanq amaanq force-pushed the generate-test-failure branch from bc3fe5e to aba28c2 Compare April 28, 2025 06:52
@amaanq
Copy link
Member

amaanq commented Apr 28, 2025

Let me know if my changes look good to you @jamessan, thanks!

@clason clason added the ci:backport release-0.25 Backport label label Apr 28, 2025
@jamessan
Copy link
Contributor Author

Let me know if my changes look good to you @jamessan, thanks!

CI still isn't running all tests, because it's using cargo test directly, not cargo run -p xtask -- test.

@clason
Copy link
Contributor

clason commented May 2, 2025

Be careful what you wish for ;)

@jamessan
Copy link
Contributor Author

jamessan commented Jun 5, 2025

Should we maybe separate the bug fix from the broader CI changes?

@clason
Copy link
Contributor

clason commented Jun 5, 2025

Yes!

@jamessan jamessan force-pushed the generate-test-failure branch from 8144323 to 929992d Compare June 5, 2025 18:21
…ne_variable`

The period was dropped in the `thiserror` refactor
(79444e0), which caused the
`test_flatten_grammar_with_recursive_inline_variable` test to fail.

Signed-off-by: James McCoy <jamessan@jamessan.com>
@jamessan jamessan force-pushed the generate-test-failure branch from 929992d to fcb7c99 Compare June 5, 2025 23:10
@clason clason added the test Related to tests label Jun 6, 2025
@clason clason merged commit a6e530b into tree-sitter:master Jun 6, 2025
19 checks passed
@tree-sitter-ci-bot
Copy link

Successfully created backport PR for release-0.25:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:backport release-0.25 Backport label test Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants