Skip to content

Comments

Move reprolang to a top-level directory#363

Merged
jupblb merged 5 commits intomainfrom
michal/reprolang
Feb 24, 2026
Merged

Move reprolang to a top-level directory#363
jupblb merged 5 commits intomainfrom
michal/reprolang

Conversation

@jupblb
Copy link
Member

@jupblb jupblb commented Feb 24, 2026

Reprolang is a toy language that can be used to write very simple integration tests for scip. I find it to be very useful. I was surprised that it's stored in some deeply nested directory.

Since the project is a language with its own indexer, I made it more isolated with its own go.mod. I've also migrated it to use tree-sitter/go-tree-sitter instead of no longer maintained smacker/go-tree-sitter.

- Move cmd/scip/tests/reprolang/ to reprolang/
- Move cmd/scip/tests/snapshots/ to reprolang/tests/snapshots/
- Move cmd/scip/tests/test_cmd/ to reprolang/tests/test_cmd/
- Extract test runner logic from cmd/scip/test.go to
  bindings/go/scip/testutil/test_runner.go (exported as RunTests)
- Move TestSCIPSnapshots to reprolang/bindings/go/repro/snapshot_test.go
- Move TestSCIPTests to reprolang/bindings/go/repro/test_cmd_test.go
- Move TestTestCasesForLine to bindings/go/scip/testutil/test_runner_test.go
- Update cmd/scip/test.go to use testutil.RunTests
- Clean up cmd/scip/main_test.go (remove moved tests and unused imports)
…dule

- bindings/go/repro/ → repro/ (flatten 3 levels of nesting)
- src/ → grammar/ (meaningful package name instead of 'package src')
- tests/ → testdata/ (Go convention)
- Add separate go.mod with replace directive for isolation
- Remove go-tree-sitter from root go.mod (now only in reprolang)
…-sitter

Migrate the reprolang package to the official Go tree-sitter bindings:
- sitter.ParseCtx → NewParser/SetLanguage/Parse
- node.Type() → node.Kind()
- node.StartPoint/EndPoint → node.StartPosition/EndPosition
- ChildCount/Child index types: uint32/int → uint
- grammar.GetLanguage() → grammar.Language() returning unsafe.Pointer
- Store tree in reproSourceFile to keep it alive for node access
- Remove unused context parameter from parseSourceFile
- Fix import ordering in binding_test.go for goimports
- Update reprolang vendorHash and add proxyVendor to preserve CGo files
- Add tree-sitter to buildInputs for C library headers
@jupblb jupblb merged commit 7eeefcf into main Feb 24, 2026
8 checks passed
@jupblb jupblb deleted the michal/reprolang branch February 24, 2026 13:48
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