Skip to content

Commit

Permalink
Update patch location after sync
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Jun 11, 2024
1 parent fa56c85 commit e4fbc62
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ def deps():
name = "com_github_smacker_go_tree_sitter",
build_file_proto_mode = "disable_global",
importpath = "github.com/smacker/go-tree-sitter",
patches = ["//patches:com_github_smacker_go_tree_sitter.patch"], # keep
patches = ["//third_party:github.com/smacker/go-tree-sitter/cc_library.patch"], # keep
sum = "h1:nOtrYzQNgRipVsrOkYpVU/ZMDS3/+78It68cPBPKy8A=",
version = "v0.0.0-20240514083259-c5d1f3f5f99e",
)
Expand Down
Empty file added third_party/BUILD.bazel
Empty file.
25 changes: 25 additions & 0 deletions third_party/github.com/smacker/go-tree-sitter/cc_library.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- BUILD.bazel
+++ BUILD.bazel
@@ -1,5 +1,11 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

+cc_library(
+ name = "headers",
+ hdrs = ["alloc.h", "array.h"],
+ visibility = ["//:__subpackages__"],
+)
+
go_library(
name = "go-tree-sitter",
srcs = [

--- python/BUILD.bazel
+++ python/BUILD.bazel
@@ -9,6 +9,7 @@
"scanner.c",
],
cgo = True,
+ cdeps = ["//:headers"],
importpath = "github.com/smacker/go-tree-sitter/python",
visibility = ["//visibility:public"],
deps = ["//:go-tree-sitter"],

0 comments on commit e4fbc62

Please sign in to comment.