Commit 4af1d7e
Fix go importing
This is attempt two, as the first attempt,
bf66a6a, only worked locally when using
a go.mod require directive.
When grabbing a module remotely, Go assumes that all dependent code is
in the last directory, e.g.
go get github.com/smoeding/tree-sitter-puppet/bindings/go
Grabs everything in /go and below, so compilation fails, since the C
code in the parent directory cannot be found.
This problem does not occur in local development however, since the
parent directory does exist, which is why adding a require directive
masks the problem.
Instead we want to use the go.mod file /tree-sitter-puppet/go.mod and
delete tree-sitter-puppet/bindings/go.mod. Then a go get will grab the C
code as well.
This is also how other tree-sitter bindings are setup:
https://github.com/tree-sitter-grammars/tree-sitter-yaml
Two other changes are made:
1. Switch the Go tree-sitter bindings from
github.com/smacker/go-tree-sitter to
github.com/tree-sitter/tree-sitter-puppet, as the latter are
unmaintained.
2. Add an indirect dep on github.com/mattn/go-pointer1 parent e436795 commit 4af1d7e
4 files changed
Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments