Skip to content

Commit 1232bc5

Browse files
author
Patrick Thomson
committed
Ensure that the HTTP archive we download contains the corpus.
1 parent b8f2995 commit 1232bc5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build/common.bzl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ def tree_sitter_node_types_archive(name, version, sha256, urls = [], nodetypespa
3636
http_archive(
3737
name = name,
3838
build_file_content = """
39+
package(default_visibility = ["//visibility:public"])
40+
3941
exports_files(glob(["{}"]))
42+
43+
filegroup(name = "corpus", srcs = glob(['corpus/*.txt']))
4044
""".format(nodetypespath),
4145
strip_prefix = "{}-{}".format(name, version),
4246
urls = ["https://github.com/tree-sitter/{}/archive/v{}.tar.gz".format(name, version)],
@@ -59,7 +63,7 @@ def semantic_language_library(language, name, srcs, nodetypes = "", **kwargs):
5963
'-DNODE_TYPES_PATH="../../../../$(rootpath {})"'.format(nodetypes),
6064
],
6165
srcs = srcs,
62-
extra_srcs = [nodetypes],
66+
extra_srcs = [nodetypes, "@tree-sitter-{}//:corpus".format(language)],
6367
deps = [
6468
"//:base",
6569
"//semantic-analysis",

0 commit comments

Comments
 (0)