Skip to content

Add some tests for Clojure 1.12 syntax changes#68

Open
sogaiu wants to merge 1 commit into
masterfrom
clojure-1.12-syntax-tests
Open

Add some tests for Clojure 1.12 syntax changes#68
sogaiu wants to merge 1 commit into
masterfrom
clojure-1.12-syntax-tests

Conversation

@sogaiu

@sogaiu sogaiu commented Jul 15, 2025

Copy link
Copy Markdown
Owner

This PR is an attempt to address #67.

It contains some corpus tests for:

param-tags-metadata.txt currently packages things to be tested all as a single test. This might be unwieldy if we need to examine output.

May be the way things are grouped here isn't a bad way to organize things...

@sogaiu
sogaiu force-pushed the clojure-1.12-syntax-tests branch from 12bf19b to 059d244 Compare July 16, 2025 00:52
@sogaiu

sogaiu commented Jul 16, 2025

Copy link
Copy Markdown
Owner Author

Went with a different grouping that seemed more sensible for the context of parsing.

@sogaiu

sogaiu commented Jul 16, 2025

Copy link
Copy Markdown
Owner Author

Adding a note here about how the built-in testing system has some unfortunate drawbacks.

One of those is the multistep manual flow involved in examining the original input to the test. AFAIU, the input for a test is not displayed even when the test errors.

In addition, the name / location of the file that contains the test is not really "physically" close to where the error details are reported in the output.

The process of looking up the input to a failed test is on the unsatisfactory side [1].

For reference there is this comment at the tree-sitter repository that also touches on some related bits.


[1] The flow is roughly like:

  1. Notice some red in the output
  2. Find out which test number (and test name) that is associated with
  3. Scroll up to find which test file name (actually without extension) contains the relevant test
  4. Navigate to the relevant test file
  5. Search the test file using the test name

yogthos pushed a commit to yogthos/tree-sitter-clojure that referenced this pull request Apr 8, 2026
Add corpus tests for Clojure 1.12 syntax changes from sogaiu/tree-sitter-clojure#68:
- Qualified methods (CLJ-2793)
- Param tags metadata (CLJ-2805)
- Symbolic array type representation (CLJ-2807)
kwojcik-blockether pushed a commit to Blockether/tree-sitter-clojure that referenced this pull request Jun 22, 2026
sogaiu#68)

Apply the maintainer's own PR sogaiu#68 test files for the Clojure 1.12 syntax
changes — qualified methods (CLJ-2793), param-tags metadata (CLJ-2805),
symbolic array type representation (CLJ-2807) — and drop our interim
clojure_1_12.txt in favour of these canonical ones. All pass against our
parser unchanged (the grammar already handles 1.12 as qualified symbols +
metadata). 124/124 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0111BBUk1JkRVkpQ5VJ1rdT4
kwojcik-blockether pushed a commit to Blockether/tree-sitter-clojure that referenced this pull request Jun 22, 2026
Bump version + changelog for the batch of upstream-issue fixes (sogaiu#62, sogaiu#52,
sogaiu#64, sogaiu#67/sogaiu#68, sogaiu#65) and the Blockether author credit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0111BBUk1JkRVkpQ5VJ1rdT4
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