The package rpms/rust-tree-sitter-cli.git has added or updated architecture specific
content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-tree-sitter-cli.git/commit/?....
Change:
+%ifnarch %{nodejs_arches}
Thanks.
Full change:
============
commit 55e4634161199134f500b6c03c7ac6f392b6fc44
Author: Aleksei Bavshin <alebastr(a)fedoraproject.org>
Date: Wed Apr 6 08:35:11 2022 -0700
Initial import (#2028900)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..08d881c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.src.rpm
+results_*/
+/tree-sitter-cli-0.20.6.crate
+/tree-sitter-fixtures-0.20.6.tar.xz
diff --git a/LICENSE.dependencies b/LICENSE.dependencies
new file mode 100644
index 0000000..2688335
--- /dev/null
+++ b/LICENSE.dependencies
@@ -0,0 +1,88 @@
+ASL 2.0 or Boost: rust-ryu 1.0.9
+ASL 2.0 or MIT: rust-ascii 1.0.0
+ASL 2.0 or MIT: rust-autocfg 1.1.0
+ASL 2.0 or MIT: rust-cexpr 0.6.0
+ASL 2.0 or MIT: rust-hashbrown 0.11.2
+ASL 2.0 or MIT: rust-indexmap 1.8.1
+ASL 2.0 or MIT: rust-peeking_take_while 0.1.2
+ASL 2.0 or MIT: rust-rustc-hash 1.1.0
+ASL 2.0: rust-chunked_transfer 1.4.0
+ASL 2.0: rust-clang-sys 1.3.1
+BSD: rust-bindgen 0.59.2
+ISC: rust-libloading 0.7.3
+MIT and Unicode: rust-tree-sitter 0.20.6
+MIT or ASL 2.0 or zlib: rust-tinyvec_macros 0.1.0
+MIT or ASL 2.0: rust-anyhow 1.0.56
+MIT or ASL 2.0: rust-bitflags 1.3.2
+MIT or ASL 2.0: rust-bumpalo 3.9.1
+MIT or ASL 2.0: rust-cc 1.0.73
+MIT or ASL 2.0: rust-cfg-if 1.0.0
+MIT or ASL 2.0: rust-chrono 0.4.19
+MIT or ASL 2.0: rust-dirs-sys 0.3.7
+MIT or ASL 2.0: rust-dirs3 3.0.2
+MIT or ASL 2.0: rust-either 1.6.1
+MIT or ASL 2.0: rust-env_logger 0.9.0
+MIT or ASL 2.0: rust-form_urlencoded 1.0.1
+MIT or ASL 2.0: rust-glob 0.3.0
+MIT or ASL 2.0: rust-humantime 2.1.0
+MIT or ASL 2.0: rust-idna 0.2.3
+MIT or ASL 2.0: rust-itoa 1.0.1
+MIT or ASL 2.0: rust-js-sys 0.3.56
+MIT or ASL 2.0: rust-lazy_static 1.4.0
+MIT or ASL 2.0: rust-lazycell 1.3.0
+MIT or ASL 2.0: rust-libc 0.2.121
+MIT or ASL 2.0: rust-log 0.4.16
+MIT or ASL 2.0: rust-minimal-lexical 0.2.1
+MIT or ASL 2.0: rust-num-integer 0.1.44
+MIT or ASL 2.0: rust-num-traits 0.2.14
+MIT or ASL 2.0: rust-once_cell 1.10.0
+MIT or ASL 2.0: rust-percent-encoding 2.1.0
+MIT or ASL 2.0: rust-proc-macro2 1.0.36
+MIT or ASL 2.0: rust-quote 1.0.17
+MIT or ASL 2.0: rust-regex 1.5.5
+MIT or ASL 2.0: rust-regex-syntax 0.6.25
+MIT or ASL 2.0: rust-semver 1.0.7
+MIT or ASL 2.0: rust-serde 1.0.136
+MIT or ASL 2.0: rust-serde_derive 1.0.136
+MIT or ASL 2.0: rust-serde_json 1.0.79
+MIT or ASL 2.0: rust-shlex 1.1.0
+MIT or ASL 2.0: rust-smallbitvec 2.5.1
+MIT or ASL 2.0: rust-syn 1.0.90
+MIT or ASL 2.0: rust-thiserror 1.0.30
+MIT or ASL 2.0: rust-thiserror-impl 1.0.30
+MIT or ASL 2.0: rust-tiny_http 0.8.2
+MIT or ASL 2.0: rust-toml 0.5.8
+MIT or ASL 2.0: rust-unicode-bidi 0.3.7
+MIT or ASL 2.0: rust-unicode-normalization 0.1.19
+MIT or ASL 2.0: rust-unicode-width 0.1.9
+MIT or ASL 2.0: rust-unicode-xid 0.2.2
+MIT or ASL 2.0: rust-url 2.2.2
+MIT or ASL 2.0: rust-vec_map 0.8.2
+MIT or ASL 2.0: rust-wasm-bindgen 0.2.79
+MIT or ASL 2.0: rust-wasm-bindgen-backend 0.2.79
+MIT or ASL 2.0: rust-wasm-bindgen-macro 0.2.79
+MIT or ASL 2.0: rust-wasm-bindgen-macro-support 0.2.79
+MIT or ASL 2.0: rust-wasm-bindgen-shared 0.2.79
+MIT or ASL 2.0: rust-web-sys 0.3.56
+MIT or ASL 2.0: rust-webbrowser 0.5.5
+MIT: rust-ansi_term 0.12.1
+MIT: rust-atty 0.2.14
+MIT: rust-clap2 2.34.0
+MIT: rust-difference 2.0.0
+MIT: rust-html-escape 0.2.11
+MIT: rust-matches 0.1.9
+MIT: rust-nom 7.1.1
+MIT: rust-strsim 0.10.0
+MIT: rust-textwrap0.11 0.11.0
+MIT: rust-tree-sitter-config 0.19.0
+MIT: rust-tree-sitter-highlight 0.20.1
+MIT: rust-tree-sitter-loader 0.20.0
+MIT: rust-tree-sitter-tags 0.20.2
+MIT: rust-utf8-width 0.1.6
+MIT: rust-which 4.2.4
+Unlicense or MIT: rust-aho-corasick 0.7.18
+Unlicense or MIT: rust-memchr 2.4.1
+Unlicense or MIT: rust-same-file 1.0.6
+Unlicense or MIT: rust-termcolor 1.1.3
+Unlicense or MIT: rust-walkdir 2.3.2
+zlib or ASL 2.0 or MIT: rust-tinyvec 1.5.1
diff --git a/LICENSE.upstream b/LICENSE.upstream
new file mode 100644
index 0000000..4c22002
--- /dev/null
+++ b/LICENSE.upstream
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018-2021 Max Brunsfeld
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 5193661..a5542a8 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,53 @@
# rust-tree-sitter-cli
-The rust-tree-sitter-cli package
+## Maintenance guide
+
+All multi-package updates must be done in a side-tag[1].
+
+Unfortunately, most of the packages lack tests, so if anything goes wrong you'll know
it
+when `rust-tree-sitter-cli` fails to build. Quite possibly on one of the uncommon
arches,
+such as `s390x` or `ppc64le`. Thus, it's recommended to test the updates in Copr
first,
+and proceed to build for Fedora once all the packages are successfully built in Copr.
+
+### Update sequence:
+
+1. `rpmdev-bumpspec -n $VERSION rust-tree-sitter-cli.spec`
+2. If the crate features have changed, regenerate the spec and merge back local changes:
+ `rust2rpm -a -s -t fedora tree-sitter-cli $VERSION`
+3. Fetch the test fixture revisions that were used to validate the release in upstream
CI.
+ * Compare the list of grammars in `./get-test-fixtures.sh` with
`./script/fetch-fixtures`.
+ Add/remove the languages and update branches if necessary.
+ * Run `./get-test-fixtures.sh [$VERSION] --update` to get the required grammar
revisions
+ (passing the version is not required; if `/usr/bin/rpmspec` is present the script
will get value from the spec file).
+ * Copy the script output and update `./get-test-fixtures.sh`
+ * Run `./get-test-fixtures.sh [$VERSION]` again to generate the archive
+4. Upload new sources
+ `fedpkg new-sources tree-sitter-cli-$VERSION.crate
tree-sitter-fixtures-$VERSION.tar.xz`
+5. Update the list of dependency crates and licenses (and the short version in the spec
file comment):
+ ```sh
+ mock --no-cleanup-after <srpm> --without-check
+ mock --dnf-cmd repoquery --cacheonly "rust-*-devel" --installed --qf
"%{LICENSE}: %{source_name} %{version}" | \
+ dos2unix | tee LICENSE.dependencies | cut -d: -f1 | sort -u
+ ```
+
+### Build order:
+
+1. [`tree-sitter`](https://src.fedoraproject.org/rpms/tree-sitter) (if updated)
+2. rust-tree-sitter, rust-tree-sitter-config
+3. rust-tree-sitter-highlight, rust-tree-sitter-tags
+4. rust-tree-sitter-loader
+5. rust-tree-sitter-cli
+
+Possible commands:
+```sh
+RELEASE=<fXX|rawhide>
+cd rust-tree-sitter-cli
+git checkout $RELEASE
+# update spec or merge from rawhide
+fedpkg request-side-tag
+koji wait-repo $RELEASE-side-XXXXX
+fedpkg chain-build --target=$RELEASE-side-XXXXX rust-tree-sitter rust-tree-sitter-config
: rust-tree-sitter-highlight rust-tree-sitter-tags : rust-tree-sitter-loader :
+```
+Note: as the crates have different update frequency, it is fine to exclude unchanged
packages from the rebuild and from the command above.
+
+[1]:
https://docs.fedoraproject.org/en-US/package-maintainers/Package_Update_G...
diff --git a/get-test-fixtures.sh b/get-test-fixtures.sh
new file mode 100755
index 0000000..f4e0f4a
--- /dev/null
+++ b/get-test-fixtures.sh
@@ -0,0 +1,115 @@
+#!/bin/sh
+#
+# Prepare archive with test fixtures for tree-sitter unit-tests
+#
+# The upstream CI is using `master` to fetch the grammars; see `script/fetch-fixtures`.
+# Replace with the exact commits or tags to make reproducible.
+# Make sure to check the licenses for all the projects we download here.
+set -e
+
+DESTDIR="$(dirname "$0" | xargs readlink -f)"
+VERSION=$(rpmspec --query --qf '%{version}' --srpm
"$DESTDIR/rust-tree-sitter-cli.spec")
+MODE=fetch
+
+while [ "$#" -gt 0 ]; do
+ case $1 in
+ [0-9]*)
+ VERSION="$1";;
+ --update)
+ MODE=update;;
+ *)
+ break;;
+ esac
+ shift
+done
+
+if [ -z "$VERSION" ]; then
+ echo "Cannot determine the tree-sitter-cli version"
+ exit 1
+fi
+
+OUTFILE="tree-sitter-fixtures-$VERSION.tar.xz"
+# WORKDIR="$(mktemp -d tree-sitter-XXXX)"
+WORKDIR="${PWD}/tree-sitter-temp-$VERSION"
+
+extract() {
+ test -d "$2" || mkdir -p "$2";
+ tar xaf "$1" -C "$2" --strip-components=1
+}
+
+get () { # args: github_repo, commit, destination
+ FILENAME="$(basename "$1")-$2.tar.gz"
+ OUT_DIR=${3:-$(basename "$1")-$2}
+ echo "Fetching $1@$2 to $OUT_DIR"
+ if [ ! -f "$WORKDIR/$FILENAME" ]; then
+ curl -LSs -o "$WORKDIR/$FILENAME"
"https://github.com/$1/archive/$2/$FILENAME"
+ fi
+ rm -rf "$OUT_DIR"
+ extract "$WORKDIR/$FILENAME" "$OUT_DIR"
+}
+
+# Get date of the commit (tag, sha or any other ref)
+get_commit_date () { # args: github_repo, ref
+ curl -LSs -H "Accept: application/vnd.github.v3+json" \
+ "https://api.github.com/repos/$1/commits/$2" |
+ jq -r '.commit.committer.date'
+}
+
+# Get last commit in the branch made before the specified timestamp
+get_commit_by_date () { # args: github_repo, timestamp, ref (optional)
+ curl -LSs -H "Accept: application/vnd.github.v3+json" \
+
"https://api.github.com/repos/$1/commits?per_page=1&until=$2${3:+&sha=$3}"
|
+ jq -r '.[0].sha'
+}
+
+# Get test repository commits at the timestamp of the tree-sitter release tag
+# (i.e. the exact test data the release tag was tested on)
+#
+# GitHub API is rate limted, so don't abuse this mode
+if [ "$MODE" = "update" ]; then
+ TS_TAG_DATE=$(get_commit_date tree-sitter/tree-sitter "v$VERSION")
+ echo "# tree-sitter tag date: $TS_TAG_DATE"
+ echo "# LANGUAGE BRANCH CACHED
REVISION"
+
+ fetch_grammar () { # args: language, branch, cached revision
+ COMMIT=$(get_commit_by_date "tree-sitter/tree-sitter-$1"
"$TS_TAG_DATE" "$2")
+ printf "fetch_grammar %-17s %-27s %s\n" "$1" "$2"
"$COMMIT"
+ }
+else
+ mkdir -p "$WORKDIR"
+ cd "$WORKDIR"
+
+ # License: MIT
+ get tree-sitter/tree-sitter "v$VERSION" "tree-sitter-$VERSION"
+ cd "tree-sitter-$VERSION"
+
+ fetch_grammar () { # args: language, branch, cached revision
+ get "tree-sitter/tree-sitter-$1" "${3:-${2:-master}}"
"test/fixtures/grammars/$1"
+ }
+fi
+
+# Verified that all the repositories referenced below are licensed under MIT
+# and provide LICENSE files - 2022-04-01
+# tree-sitter tag date: 2022-03-03T04:50:52Z
+# LANGUAGE BRANCH CACHED REVISION
+fetch_grammar bash master
275effdfc0edce774acf7d481f9ea195c6c403cd
+fetch_grammar c master
e348e8ec5efd3aac020020e4af53d2ff18f393a9
+fetch_grammar cpp master
a403969cbb82e53a703ca4fe4a3586ad39817348
+fetch_grammar embedded-template master
d21df11b0ecc6fd211dbe11278e92ef67bd17e97
+fetch_grammar go master
0fa917a7022d1cd2e9b779a6a8fc5dc7fad69c75
+fetch_grammar html master
161a92474a7bb2e9e830e48e76426f38299d99d1
+fetch_grammar java master
8a6ab8e8adb119bc35b133040077b60f6cf539ea
+fetch_grammar javascript partial-order-precedences
4c2f62903210181ededf461aaa82ca1f804e13e4
+fetch_grammar jsdoc master
189a6a4829beb9cdbe837260653b4a3dfb0cc3db
+fetch_grammar json master
203e239408d642be83edde8988d6e7b20a19f0e8
+fetch_grammar php master
0ce134234214427b6aeb2735e93a307881c6cd6f
+fetch_grammar python master
78c4e9b6b2f08e1be23b541ffced47b15e2972ad
+fetch_grammar ruby master
daa17aeb69995788432a11bcc52cd78a0f768ca5
+fetch_grammar rust master
8e7bae52db18f589d5fd80e91f54ccd2f0b5e7c4
+fetch_grammar typescript master
e8e8e8dc2745840b036421b4e43286750443cb13
+
+if [ "$MODE" != "update" ]; then
+ echo "Writing source archive $DESTDIR/$OUTFILE"
+ # Drop the examples from the grammar repos. Don't want to check the licenses for
unused files
+ tar caf "$DESTDIR/$OUTFILE" --exclude=examples -v LICENSE test/fixtures
+fi
diff --git a/rust-tree-sitter-cli.spec b/rust-tree-sitter-cli.spec
new file mode 100644
index 0000000..2dd5c8c
--- /dev/null
+++ b/rust-tree-sitter-cli.spec
@@ -0,0 +1,125 @@
+# Generated by rust2rpm 21
+%bcond_without check
+
+%global crate tree-sitter-cli
+
+Name: rust-%{crate}
+Version: 0.20.6
+Release: %autorelease
+Summary: CLI tool for developing, testing, and using Tree-sitter parsers
+
+# Upstream license specification: MIT
+License: MIT
+URL:
https://crates.io/crates/tree-sitter-cli
+Source: %{crates_source}
+# Upstream license file - tree-sitter/tree-sitter#1520
+Source1:
https://github.com/tree-sitter/tree-sitter/raw/v%{version}/LICENSE#/LICEN...
+# The data required for running tests (multiple sources, MIT with license files)
+# Generated with get-test-fixtures.sh
+Source2: tree-sitter-fixtures-%{version}.tar.xz
+Source3: get-test-fixtures.sh
+# Fix tests on non-x86 architectures -
https://github.com/tree-sitter/tree-sitter#1692
+Patch0: test-use-platform-independent-c_char-instead-of-i8.patch
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging >= 21
+%if %{with check}
+%ifarch %{nodejs_arches}
+# Required by tests::corpus_test::test_feature_corpus_files
+BuildRequires: /usr/bin/node
+%endif
+%endif
+
+%global _description %{expand:
+CLI tool for developing, testing, and using Tree-sitter parsers.}
+
+%description %{_description}
+
+%package -n %{crate}
+Summary: %{summary}
+# ASL 2.0
+# ASL 2.0 or Boost
+# ASL 2.0 or MIT
+# BSD
+# ISC
+# MIT
+# MIT and Unicode
+# MIT or ASL 2.0 or zlib
+# Unlicense or MIT
+# See LICENSE.dependencies for a full list of buildroot crates and licenses
+License: MIT and ASL 2.0 and BSD and ISC and Unicode
+
+%description -n %{crate} %{_description}
+
+%files -n %{crate}
+%license LICENSE
+%doc README.md
+%{_bindir}/tree-sitter
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%doc %{crate_instdir}/README.md
+%{crate_instdir}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p2 %{?with_check:-b2}
+%cargo_prep
+cp %{SOURCE1} LICENSE
+# Provide symlink for the C library headers. Test suite requires that
+# to compile parsers without libtree-sitter-devel.
+# See cli/src/tests/helpers/{dirs,fixtures}.rs
+ln -sf %{cargo_registry}/tree-sitter-0.* ../lib
+# Delete unwanted files
+rm -rf npm
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+TEST_ARGS=(
+ --
+ # forbid parallel execution; tests may attempt to compile and load the same parser
library
+ --test-threads=1
+%ifarch s390x
+ #
https://github.com/tree-sitter/tree-sitter/issues/1693
+ --skip tests::query_test::test_query_is_pattern_guaranteed_at_step
+%endif
+%ifnarch %{nodejs_arches}
+ # requres /usr/bin/node
+ --skip tests::corpus_test::test_feature_corpus_files
+%endif
+ )
+%cargo_test -- "${TEST_ARGS[@]}"
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..e3db8df
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+SHA512 (tree-sitter-cli-0.20.6.crate) =
fa66d507d2735a6819e2ee7664b4a5910a51b0c8d9c3d4093f3e17f6b6c4dbbf6a8017c23db9a1ebfc4832833d1d7425985ffe5f32367f8123b9531f07fd87d2
+SHA512 (tree-sitter-fixtures-0.20.6.tar.xz) =
33087c620dba72bc5d5d84922a741c1adc059d38276607ea5833af1dfdfced473742db5d246c5409820b2b5a6cc6b8c7eddc72de72f6ffa7bff5c0f5750c850c
diff --git a/test-use-platform-independent-c_char-instead-of-i8.patch
b/test-use-platform-independent-c_char-instead-of-i8.patch
new file mode 100644
index 0000000..d37d981
--- /dev/null
+++ b/test-use-platform-independent-c_char-instead-of-i8.patch
@@ -0,0 +1,67 @@
+From b27b4665ac076873d6c0e27a6009d8b10fb5d264 Mon Sep 17 00:00:00 2001
+From: Aleksei Bavshin <alebastr89(a)gmail.com>
+Date: Sun, 5 Dec 2021 20:25:29 -0800
+Subject: [PATCH] test: fix incorrect uses of i8 instead of c_char
+
+Fixes build on aarch64, ppc64le and other platforms that have c_char
+defined as u8.
+---
+ cli/src/tests/highlight_test.rs | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/cli/src/tests/highlight_test.rs b/cli/src/tests/highlight_test.rs
+index 6b09d64c5..e0b356d28 100644
+--- a/cli/src/tests/highlight_test.rs
++++ b/cli/src/tests/highlight_test.rs
+@@ -1,6 +1,7 @@
+ use super::helpers::fixtures::{get_highlight_config, get_language,
get_language_queries_path};
+ use lazy_static::lazy_static;
+ use std::ffi::CString;
++use std::os::raw::c_char;
+ use std::sync::atomic::{AtomicUsize, Ordering};
+ use std::{fs, ptr, slice, str};
+ use tree_sitter_highlight::{
+@@ -489,15 +490,15 @@ fn test_highlighting_via_c_api() {
+ ];
+ let highlight_names = highlights
+ .iter()
+- .map(|h| h["class=".len()..].as_ptr() as *const i8)
++ .map(|h| h["class=".len()..].as_ptr() as *const c_char)
+ .collect::<Vec<_>>();
+ let highlight_attrs = highlights
+ .iter()
+- .map(|h| h.as_bytes().as_ptr() as *const i8)
++ .map(|h| h.as_bytes().as_ptr() as *const c_char)
+ .collect::<Vec<_>>();
+ let highlighter = c::ts_highlighter_new(
+- &highlight_names[0] as *const *const i8,
+- &highlight_attrs[0] as *const *const i8,
++ &highlight_names[0] as *const *const c_char,
++ &highlight_attrs[0] as *const *const c_char,
+ highlights.len() as u32,
+ );
+
+@@ -515,9 +516,9 @@ fn test_highlighting_via_c_api() {
+ js_scope.as_ptr(),
+ js_injection_regex.as_ptr(),
+ language,
+- highlights_query.as_ptr() as *const i8,
+- injections_query.as_ptr() as *const i8,
+- locals_query.as_ptr() as *const i8,
++ highlights_query.as_ptr() as *const c_char,
++ injections_query.as_ptr() as *const c_char,
++ locals_query.as_ptr() as *const c_char,
+ highlights_query.len() as u32,
+ injections_query.len() as u32,
+ locals_query.len() as u32,
+@@ -534,8 +535,8 @@ fn test_highlighting_via_c_api() {
+ html_scope.as_ptr(),
+ html_injection_regex.as_ptr(),
+ language,
+- highlights_query.as_ptr() as *const i8,
+- injections_query.as_ptr() as *const i8,
++ highlights_query.as_ptr() as *const c_char,
++ injections_query.as_ptr() as *const c_char,
+ ptr::null(),
+ highlights_query.len() as u32,
+ injections_query.len() as u32,