Skip to content

Commit 5309c80

Browse files
committed
fix(ci): Stay on Nim 1.6 for now; Add tree-sitter nim as a submodule
1 parent 4dd5f5d commit 5309c80

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,6 @@
8181
path = libs/nim-confutils
8282
url = https://github.com/metacraft-labs/nim-confutils
8383
branch = codetracer
84+
[submodule "libs/tree-sitter-nim"]
85+
path = libs/tree-sitter-nim
86+
url = [email protected]:metacraft-labs/tree-sitter-nim.git

ci/lint/nim.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ echo '##########################################################################
66
echo 'Testing nimsuggest'
77
echo '###############################################################################'
88

9-
just test-nimsuggest
9+
# Use Nim 1.6 for nimsuggest - vendored libs aren't compatible with Nim 2.x nimsuggest
10+
./scripts/with-nim-1.6 just test-nimsuggest
1011

1112

1213
echo '###############################################################################'

libs/tree-sitter-nim

Submodule tree-sitter-nim added at 8e2ede8

nix/shells/main.nix

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,10 @@ in
145145
# ourPkgs.staticDeps
146146
ourPkgs.upstream-nim-codetracer
147147

148-
# Nim versions for runtime (tracing/testing user Nim programs)
149-
# nim-2_2 provides 'nim' binary for runtime compilation
150-
ourPkgs.nim-2_2
148+
# Nim 1.6 for runtime/development - compatible with vendored libs and nimsuggest
149+
# Note: Don't add nim-2_x here - it breaks nimsuggest compatibility.
150+
# Use scripts/with-nim-* for multi-version testing instead.
151+
ourPkgs.nim-1_6
151152

152153
# useful for lsp/editor support
153154
nimlsp
@@ -295,6 +296,11 @@ in
295296
export CODETRACER_DEV_TOOLS=0
296297
export CODETRACER_LOG_LEVEL=INFO
297298
299+
# Ensure tree-sitter-nim parser is generated (cached - only regenerates if needed)
300+
if [ -d "$ROOT_PATH/libs/tree-sitter-nim" ]; then
301+
(cd "$ROOT_PATH/libs/tree-sitter-nim" && just generate)
302+
fi
303+
298304
figlet "Welcome to CodeTracer"
299305
'';
300306
}

src/db-backend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ tree-sitter-pascal = "0.10.0"
5858
tree-sitter-d = "0.8.2"
5959
tree-sitter-ruby = "0.23.1"
6060
tree-sitter-python = "0.25.0"
61-
tree-sitter-nim = { path = "../../../tree-sitter-nim/bindings/rust" }
61+
tree-sitter-nim = { path = "../../libs/tree-sitter-nim/bindings/rust" }
6262

6363
# the binding for our custom tracepoint tresitter grammar:
6464
tree-sitter-tracepoint = { path = "./tree-sitter-trace/" }

0 commit comments

Comments
 (0)