Skip to content

Commit

Permalink
deps src: Automatic update
Browse files Browse the repository at this point in the history
  • Loading branch information
marvim committed Nov 11, 2024
1 parent 875710d commit 18a1a73
Show file tree
Hide file tree
Showing 30 changed files with 303 additions and 229 deletions.
30 changes: 15 additions & 15 deletions src/treesitter-stamp/download-treesitter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ function(check_file_hash has_hash hash_is_good)
set("${has_hash}" TRUE PARENT_SCOPE)

message(VERBOSE "verifying file...
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz'")
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz'")

file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz" actual_value)
file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz" actual_value)

if(NOT "${actual_value}" STREQUAL "0a8d0cf8e09caba22ed0d8439f7fa1e3d8453800038e43ccad1f34ef29537da1")
if(NOT "${actual_value}" STREQUAL "d704832a6bfaac8b3cbca3b5d773cad613183ba8c04166638af2c6e5dfb9e2d2")
set("${hash_is_good}" FALSE PARENT_SCOPE)
message(VERBOSE "SHA256 hash of
/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz
/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz
does not match expected value
expected: '0a8d0cf8e09caba22ed0d8439f7fa1e3d8453800038e43ccad1f34ef29537da1'
expected: 'd704832a6bfaac8b3cbca3b5d773cad613183ba8c04166638af2c6e5dfb9e2d2'
actual: '${actual_value}'")
else()
set("${hash_is_good}" TRUE PARENT_SCOPE)
Expand Down Expand Up @@ -71,32 +71,32 @@ function(sleep_before_download attempt)
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep "${sleep_seconds}")
endfunction()

if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz")
if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz")
check_file_hash(has_hash hash_is_good)
if(has_hash)
if(hash_is_good)
message(VERBOSE "File already exists and hash match (skip download):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz'
SHA256='0a8d0cf8e09caba22ed0d8439f7fa1e3d8453800038e43ccad1f34ef29537da1'"
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz'
SHA256='d704832a6bfaac8b3cbca3b5d773cad613183ba8c04166638af2c6e5dfb9e2d2'"
)
return()
else()
message(VERBOSE "File already exists but hash mismatch. Removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz")
endif()
else()
message(VERBOSE "File already exists but no hash specified (use URL_HASH):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz'
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz'
Old file will be removed and new file downloaded from URL."
)
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz")
endif()
endif()

set(retry_number 5)

message(VERBOSE "Downloading...
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz'
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz'
timeout='none'
inactivity timeout='none'"
)
Expand All @@ -107,7 +107,7 @@ foreach(i RANGE ${retry_number})
if(status_code IN_LIST download_retry_codes)
sleep_before_download(${i})
endif()
foreach(url IN ITEMS [====[https://github.com/tree-sitter/tree-sitter/archive/v0.24.3.tar.gz]====])
foreach(url IN ITEMS [====[https://github.com/tree-sitter/tree-sitter/archive/v0.24.4.tar.gz]====])
if(NOT url IN_LIST skip_url_list)
message(VERBOSE "Using src='${url}'")

Expand All @@ -119,7 +119,7 @@ foreach(i RANGE ${retry_number})

file(
DOWNLOAD
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz"
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz"

# no TIMEOUT
# no INACTIVITY_TIMEOUT
Expand All @@ -136,7 +136,7 @@ foreach(i RANGE ${retry_number})
check_file_hash(has_hash hash_is_good)
if(has_hash AND NOT hash_is_good)
message(VERBOSE "Hash mismatch, removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz")
else()
message(VERBOSE "Downloading... done")
return()
Expand Down
2 changes: 1 addition & 1 deletion src/treesitter-stamp/extract-treesitter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.5)

# Make file names absolute:
#
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.3.tar.gz" ABSOLUTE)
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/treesitter/v0.24.4.tar.gz" ABSOLUTE)
get_filename_component(directory "/home/runner/work/deps/deps/neovim/deps/build/src/treesitter" ABSOLUTE)

message(VERBOSE "extracting...
Expand Down
4 changes: 2 additions & 2 deletions src/treesitter-stamp/treesitter-urlinfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ method=url
command=/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/treesitter-stamp/download-treesitter.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/treesitter-stamp/verify-treesitter.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/treesitter-stamp/extract-treesitter.cmake
source_dir=/home/runner/work/deps/deps/neovim/deps/build/src/treesitter
work_dir=/home/runner/work/deps/deps/neovim/deps/build/src
url(s)=https://github.com/tree-sitter/tree-sitter/archive/v0.24.3.tar.gz
hash=SHA256=0a8d0cf8e09caba22ed0d8439f7fa1e3d8453800038e43ccad1f34ef29537da1
url(s)=https://github.com/tree-sitter/tree-sitter/archive/v0.24.4.tar.gz
hash=SHA256=d704832a6bfaac8b3cbca3b5d773cad613183ba8c04166638af2c6e5dfb9e2d2
no_extract=

15 changes: 8 additions & 7 deletions src/treesitter/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/treesitter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.24.3"
version = "0.24.4"
authors = ["Max Brunsfeld <maxbrunsfeld@gmail.com>"]
edition = "2021"
rust-version = "1.74.1"
Expand Down Expand Up @@ -96,9 +96,9 @@ walkdir = "2.5.0"
wasmparser = "0.217.0"
webbrowser = "1.0.2"

tree-sitter = { version = "0.24.3", path = "./lib" }
tree-sitter-generate = { version = "0.24.3", path = "./cli/generate" }
tree-sitter-loader = { version = "0.24.3", path = "./cli/loader" }
tree-sitter-config = { version = "0.24.3", path = "./cli/config" }
tree-sitter-highlight = { version = "0.24.3", path = "./highlight" }
tree-sitter-tags = { version = "0.24.3", path = "./tags" }
tree-sitter = { version = "0.24.4", path = "./lib" }
tree-sitter-generate = { version = "0.24.4", path = "./cli/generate" }
tree-sitter-loader = { version = "0.24.4", path = "./cli/loader" }
tree-sitter-config = { version = "0.24.4", path = "./cli/config" }
tree-sitter-highlight = { version = "0.24.4", path = "./highlight" }
tree-sitter-tags = { version = "0.24.4", path = "./tags" }
2 changes: 1 addition & 1 deletion src/treesitter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ifeq ($(OS),Windows_NT)
$(error Windows is not supported)
endif

VERSION := 0.24.3
VERSION := 0.24.4
DESCRIPTION := An incremental parsing system for programming tools
HOMEPAGE_URL := https://tree-sitter.github.io/tree-sitter/

Expand Down
2 changes: 1 addition & 1 deletion src/treesitter/build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.{
.name = "tree-sitter",
.version = "0.24.3",
.version = "0.24.4",
.paths = .{
"build.zig",
"build.zig.zon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,17 @@ impl<'a> Minimizer<'a> {
production_id: 0,
symbol,
..
} => {
if !self.simple_aliases.contains_key(symbol)
&& !self.syntax_grammar.supertype_symbols.contains(symbol)
&& !aliased_symbols.contains(symbol)
&& self.syntax_grammar.variables[symbol.index].kind
!= VariableType::Named
&& (unit_reduction_symbol.is_none()
|| unit_reduction_symbol == Some(symbol))
{
unit_reduction_symbol = Some(symbol);
continue;
}
} if !self.simple_aliases.contains_key(symbol)
&& !self.syntax_grammar.supertype_symbols.contains(symbol)
&& !self.syntax_grammar.extra_symbols.contains(symbol)
&& !aliased_symbols.contains(symbol)
&& self.syntax_grammar.variables[symbol.index].kind
!= VariableType::Named
&& (unit_reduction_symbol.is_none()
|| unit_reduction_symbol == Some(symbol)) =>
{
unit_reduction_symbol = Some(symbol);
continue;
}
_ => {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl<'a> Interner<'a> {
fn check_single(&self, elements: &[Rule], name: Option<&str>) {
if elements.len() == 1 && matches!(elements[0], Rule::String(_) | Rule::Pattern(_, _)) {
eprintln!(
"Warning: rule {} is just a `seq` or `choice` rule with a single element. This is unnecessary.",
"Warning: rule {} contains a `seq` or `choice` rule with a single element. This is unnecessary.",
name.unwrap_or_default()
);
}
Expand Down
1 change: 1 addition & 0 deletions src/treesitter/cli/loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cc.workspace = true
dirs.workspace = true
fs4.workspace = true
indoc.workspace = true
lazy_static.workspace = true
libloading.workspace = true
once_cell.workspace = true
path-slash.workspace = true
Expand Down
Loading

0 comments on commit 18a1a73

Please sign in to comment.