git.delta.rocks / jrsonnet / refs/commits / f2ff4e6fd929

difftreelog

fix rowan-related test failures

Yaroslav Bolyukin2024-02-20parent: #86f8537.patch.diff
in: master

8 files changed

modifiedCargo.lockdiffbeforeafterboth
before · Cargo.lock
215 packageslockfile v3
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,24 +18,24 @@
 jrsonnet-gcmodule = "0.3.6"
 ass-stroke = { git = "https://github.com/CertainLach/ass-stroke", version = "0.1.0" }
 
-serde = "1.0.190"
-serde_json = "1.0.107"
+serde = "1.0.197"
+serde_json = "1.0.114"
 serde_yaml_with_quirks = "0.8.24"
 
-anyhow = "1.0.48"
+anyhow = "1.0.80"
 thiserror = "1.0"
 mimallocator = "0.1.3"
 indoc = "2.0"
-dprint-core = "0.63.2"
-insta = "1.15"
-tempfile = "3.8"
+dprint-core = "0.63.3"
+insta = "1.35"
+tempfile = "3.10"
 pathdiff = "0.2.1"
-hashbrown = "0.14.2"
+hashbrown = "0.14.3"
 static_assertions = "1.1"
 rustc-hash = "1.1"
 bincode = "1.3"
-annotate-snippets = "0.9.1"
-num-bigint = "0.4.3"
+annotate-snippets = "0.9.2"
+num-bigint = "0.4.4"
 derivative = "2.2.0"
 strsim = "0.10.0"
 structdump = "0.2.0"
@@ -44,28 +44,28 @@
 syn = "2.0"
 peg = "0.8.2"
 drop_bomb = "0.1.5"
-logos = "0.12.0"
-miette = "5.5.0"
+logos = "0.12.1"
+miette = "5.10.0"
 rowan = "0.15"
 text-size = "1.1"
 md5 = "0.7.0"
-sha1 = "0.10.5"
-sha2 = "0.10.6"
+sha1 = "0.10.6"
+sha2 = "0.10.8"
 sha3 = "0.10.8"
-base64 = "0.21.0"
-indexmap = "2.0.2"
+base64 = "0.21.7"
+indexmap = "2.2.3"
 itertools = "0.11.0"
 ungrammar = "1.16.1"
-xshell = "0.2.2"
+xshell = "0.2.5"
 
-clap = "4.4"
-clap_complete = "4.4"
+clap = "4.5"
+clap_complete = "4.5"
 
-lsp-server = "0.7.4"
+lsp-server = "0.7.6"
 lsp-types = "0.94.1"
 
-regex = "1.8.4"
-lru = "0.10.0"
+regex = "1.10.3"
+lru = "0.10.1"
 
 #[profile.test]
 #opt-level = 1
modifiedcmds/jrsonnet-fmt/src/children.rsdiffbeforeafterboth
--- a/cmds/jrsonnet-fmt/src/children.rs
+++ b/cmds/jrsonnet-fmt/src/children.rs
@@ -60,41 +60,6 @@
 	out
 }
 
-pub fn trivia_between(
-	node: SyntaxNode,
-	start: Option<&SyntaxElement>,
-	end: Option<&SyntaxElement>,
-) -> EndingComments {
-	let mut iter = node.children_with_tokens().peekable();
-	while iter.peek() != start {
-		iter.next();
-	}
-	iter.next();
-
-	let loose = start.is_none() || end.is_none();
-
-	let mut out = Vec::new();
-	for item in iter.take_while(|i| Some(i) != end) {
-		if let Some(trivia) = item.as_token().cloned().and_then(Trivia::cast) {
-			out.push(Ok(trivia));
-		} else if CustomError::can_cast(item.kind()) {
-			out.push(Err(item.to_string()))
-		} else if loose {
-			break;
-		} else {
-			assert!(
-				TS![, ;].contains(item.kind()),
-				"silently eaten token: {:?}",
-				item.kind()
-			)
-		}
-	}
-	EndingComments {
-		should_start_with_newline: should_start_with_newline(None, &out),
-		trivia: out,
-	}
-}
-
 pub fn children_between<T: AstNode + Debug>(
 	node: SyntaxNode,
 	start: Option<&SyntaxElement>,
modifiedcmds/jrsonnet-fmt/src/main.rsdiffbeforeafterboth
--- a/cmds/jrsonnet-fmt/src/main.rs
+++ b/cmds/jrsonnet-fmt/src/main.rs
@@ -20,7 +20,7 @@
 };
 
 use crate::{
-	children::{trivia_after, trivia_between},
+	children::trivia_after,
 	comments::{format_comments, CommentLocation},
 };
 
modifiedcmds/jrsonnet-lsp/src/main.rsdiffbeforeafterboth
--- a/cmds/jrsonnet-lsp/src/main.rs
+++ b/cmds/jrsonnet-lsp/src/main.rs
@@ -13,7 +13,7 @@
 	let mut log = File::create("test").unwrap();
 	writeln!(log, "start").unwrap();
 	let (connection, io_threads) = Connection::stdio();
-	let capabilities = serde_json::to_value(&ServerCapabilities {
+	let capabilities = serde_json::to_value(ServerCapabilities {
 		completion_provider: Some(CompletionOptions::default()),
 		definition_provider: Some(lsp_types::OneOf::Left(true)),
 		document_link_provider: Some(DocumentLinkOptions {
modifiedcrates/jrsonnet-rowan-parser/src/generated/syntax_kinds.rsdiffbeforeafterboth
--- a/crates/jrsonnet-rowan-parser/src/generated/syntax_kinds.rs
+++ b/crates/jrsonnet-rowan-parser/src/generated/syntax_kinds.rs
@@ -290,4 +290,5 @@
 }
 #[macro_export]
 macro_rules ! T { [||] => { $ crate :: SyntaxKind :: OR } ; [??] => { $ crate :: SyntaxKind :: NULL_COAELSE } ; [&&] => { $ crate :: SyntaxKind :: AND } ; [|] => { $ crate :: SyntaxKind :: BIT_OR } ; [^] => { $ crate :: SyntaxKind :: BIT_XOR } ; [&] => { $ crate :: SyntaxKind :: BIT_AND } ; [==] => { $ crate :: SyntaxKind :: EQ } ; [!=] => { $ crate :: SyntaxKind :: NE } ; [<] => { $ crate :: SyntaxKind :: LT } ; [>] => { $ crate :: SyntaxKind :: GT } ; [<=] => { $ crate :: SyntaxKind :: LE } ; [>=] => { $ crate :: SyntaxKind :: GE } ; [<<] => { $ crate :: SyntaxKind :: LHS } ; [>>] => { $ crate :: SyntaxKind :: RHS } ; [+] => { $ crate :: SyntaxKind :: PLUS } ; [-] => { $ crate :: SyntaxKind :: MINUS } ; [*] => { $ crate :: SyntaxKind :: MUL } ; [/] => { $ crate :: SyntaxKind :: DIV } ; [%] => { $ crate :: SyntaxKind :: MODULO } ; [!] => { $ crate :: SyntaxKind :: NOT } ; [~] => { $ crate :: SyntaxKind :: BIT_NOT } ; ['['] => { $ crate :: SyntaxKind :: L_BRACK } ; [']'] => { $ crate :: SyntaxKind :: R_BRACK } ; ['('] => { $ crate :: SyntaxKind :: L_PAREN } ; [')'] => { $ crate :: SyntaxKind :: R_PAREN } ; ['{'] => { $ crate :: SyntaxKind :: L_BRACE } ; ['}'] => { $ crate :: SyntaxKind :: R_BRACE } ; [:] => { $ crate :: SyntaxKind :: COLON } ; [::] => { $ crate :: SyntaxKind :: COLONCOLON } ; [:::] => { $ crate :: SyntaxKind :: COLONCOLONCOLON } ; [;] => { $ crate :: SyntaxKind :: SEMI } ; [.] => { $ crate :: SyntaxKind :: DOT } ; [...] => { $ crate :: SyntaxKind :: DOTDOTDOT } ; [,] => { $ crate :: SyntaxKind :: COMMA } ; ['$'] => { $ crate :: SyntaxKind :: DOLLAR } ; [=] => { $ crate :: SyntaxKind :: ASSIGN } ; [?] => { $ crate :: SyntaxKind :: QUESTION_MARK } ; [tailstrict] => { $ crate :: SyntaxKind :: TAILSTRICT_KW } ; [local] => { $ crate :: SyntaxKind :: LOCAL_KW } ; [importstr] => { $ crate :: SyntaxKind :: IMPORTSTR_KW } ; [importbin] => { $ crate :: SyntaxKind :: IMPORTBIN_KW } ; [import] => { $ crate :: SyntaxKind :: IMPORT_KW } ; [if] => { $ crate :: SyntaxKind :: IF_KW } ; [then] => { $ crate :: SyntaxKind :: THEN_KW } ; [else] => { $ crate :: SyntaxKind :: ELSE_KW } ; [function] => { $ crate :: SyntaxKind :: FUNCTION_KW } ; [error] => { $ crate :: SyntaxKind :: ERROR_KW } ; [in] => { $ crate :: SyntaxKind :: IN_KW } ; [null] => { $ crate :: SyntaxKind :: NULL_KW } ; [true] => { $ crate :: SyntaxKind :: TRUE_KW } ; [false] => { $ crate :: SyntaxKind :: FALSE_KW } ; [self] => { $ crate :: SyntaxKind :: SELF_KW } ; [super] => { $ crate :: SyntaxKind :: SUPER_KW } ; [for] => { $ crate :: SyntaxKind :: FOR_KW } ; [assert] => { $ crate :: SyntaxKind :: ASSERT_KW } }
+#[allow(unused_imports)]
 pub use T;
modifiedxtask/src/sourcegen/ast.rsdiffbeforeafterboth
--- a/xtask/src/sourcegen/ast.rs
+++ b/xtask/src/sourcegen/ast.rs
@@ -148,7 +148,7 @@
 					lower_rule(&mut fields, grammar, None, rule, false);
 					let mut types = HashMap::new();
 					for field in fields.iter().filter(|f| f.token_name().is_none()) {
-						if let Some(old) = types.insert(field.ty(), field.method_name(kinds)) {
+						if let Some(_old) = types.insert(field.ty(), field.method_name(kinds)) {
 							// panic!("{name}.{} has same type as {name}.{}, resolve conflict by wrapping one field: {}", old, field.method_name(kinds), field.ty());
 						}
 						// TODO: check for assignable field types, i.e you can have
modifiedxtask/src/sourcegen/mod.rsdiffbeforeafterboth
--- a/xtask/src/sourcegen/mod.rs
+++ b/xtask/src/sourcegen/mod.rs
@@ -183,6 +183,7 @@
 
 		#[macro_export]
 		macro_rules! T {#(#t_macros);*}
+		#[allow(unused_imports)]
 		pub use T;
 	};