Skip to content

Commit 9f9df8c

Browse files
authored
CMN-1317: As Ada I want to update the poc-plpgsql-analyzer (#138)
1 parent 2dcb981 commit 9f9df8c

File tree

17 files changed

+1258
-3451
lines changed

17 files changed

+1258
-3451
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
strategy:
2020
matrix:
2121
toolchain:
22-
- 1.80.0 # MSRV
22+
- 1.90.0 # MSRV
2323
- stable
2424
- nightly
2525

2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v5
2828

2929
- name: Install tools
3030
run: |
@@ -52,7 +52,7 @@ jobs:
5252
run: cargo clippy --all-targets -- -D warnings
5353

5454
- name: Run tests
55-
run: cargo test -p source_gen -p poc-plpgsql-analyzer --features coverage-tests
55+
run: cargo test -p source_gen -p poc-plpgsql-analyzer --features coverage-tests
5656

5757
- name: Generate rustdoc
5858
run: cargo doc --no-deps
@@ -64,7 +64,7 @@ jobs:
6464
timeout-minutes: 15
6565

6666
steps:
67-
- uses: actions/checkout@v3
67+
- uses: actions/checkout@v5
6868

6969
- name: Install tools
7070
run: |
@@ -92,7 +92,7 @@ jobs:
9292
- name: Build using wasm-pack
9393
run: wasm-pack build --release --target nodejs
9494

95-
- uses: actions/upload-artifact@v3
95+
- uses: actions/upload-artifact@v4
9696
with:
9797
name: wasm-library
9898
path: pkg/

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
timeout-minutes: 15
2121

2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v5
2424

2525
- name: Setup Node
2626
uses: actions/setup-node@v3

.github/workflows/typescript-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
timeout-minutes: 15
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v5
2222

2323
- name: Install tools
2424
run: |

Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ build = true
1616
crate-type = ["cdylib", "rlib"]
1717

1818
[dependencies]
19-
indexmap = "^1.9.1"
19+
indexmap = "^2.12.0"
2020
lazy_static = "^1.4.0"
21-
logos = "^0.12.1"
22-
num-derive = "^0.3.3"
21+
logos = "^0.15.1"
22+
num-derive = "^0.4.2"
2323
num-traits = "^0.2.15"
24-
rowan = "^0.15.10"
25-
serde-wasm-bindgen = "^0.5.0"
24+
rowan = "^0.16.1"
25+
serde-wasm-bindgen = "^0.6.5"
2626
text-size = "^1.1.0"
27-
thiserror = "^1.0.35"
27+
thiserror = "^2.0.17"
2828
tsify = "0.4.3"
29-
unicode-width = "0.1.10"
29+
unicode-width = "^0.2.2"
3030
wasm-bindgen = "^0.2.86"
3131

3232
[dependencies.serde]
@@ -40,12 +40,12 @@ path = "./crates/source_gen"
4040
path = "./crates/definitions"
4141

4242
[dev-dependencies]
43-
datatest-stable = "^0.1.3"
43+
datatest-stable = "^0.3.3"
4444
expect-test = "^1.4.0"
45-
heck = "0.4.1"
45+
heck = "^0.5.0"
4646
pretty_assertions = "^1.3.0"
47-
proc-macro2 = "1.0.57"
48-
quote = "1"
47+
proc-macro2 = "^1.0.57"
48+
quote = "^1"
4949

5050
[profile.release]
5151
lto = true

DEVELOPMENT.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To contribute to this project, follow these steps:
5656
5757
## Requirements
5858
59-
* A working Rust toolchain using [rustup](https://rustup.rs/) (at least 1.80.0)
59+
* A working Rust toolchain using [rustup](https://rustup.rs/) (at least 1.90.0)
6060
* [`wasm-pack`](https://rustwasm.github.io/wasm-pack/installer/) (for building WebAssembly)
6161
6262
## Getting started
@@ -113,5 +113,3 @@ cargo doc --document-private-items
113113
It is endorsed to install the `wasm-opt` tool from the
114114
[`binaryen`](https://github.com/WebAssembly/binaryen) project,
115115
which `wasm-pack` will automatically use to optimize the generated WASM code.
116-
117-

crates/definitions/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
heck = "0.5.0"
10-
proc-macro2 = "1.0.86"
11-
quote = "1.0.36"
9+
heck = "^0.5.0"
10+
proc-macro2 = "^1.0.86"
11+
quote = "^1.0.36"

crates/definitions/src/data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ pub const SYNTAX_NODES: &'_ [SyntaxNode<'_>] = &[
466466
S!("element_spec", "A node that contains an element_spec"),
467467
S!("else_expression", "A node containing an else expression"),
468468
S!("error", "An error token with a cause"),
469-
S!("exclam", "An exclamation mark `!`"),
469+
S!("exclam", "An exclamation mark `!`"),
470470
S!("execute_immediate_stmt", "A node that contains a full EXECUTE IMMEDIATE statement"),
471471
S!("exit_stmt", "A node that contains a full EXIT statement"),
472472
S!("expression", "Holds a generic SQL logic/arithmetic expression"),
@@ -475,7 +475,7 @@ pub const SYNTAX_NODES: &'_ [SyntaxNode<'_>] = &[
475475
S!("for_loop", "A node containing a FOR LOOP"),
476476
S!("func_decl_in_type", "A node containing a func_decl_in_type"),
477477
S!("function", "A node that marks a full CREATE [..] FUNCTION block"),
478-
S!("function_header", "A node that marks a FUNCTION header with params and return type"),
478+
S!("function_header", "A node that marks a FUNCTION header with params and return type"),
479479
S!("function_invocation", "An invocation of a function, from the identifier and the opening bracket to the closing bracket"),
480480
S!("hier_ids", "A node containing hier_ids"),
481481
S!("function_spec", "A node containing a function_spec"),

crates/definitions/src/token.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! Generates the [`crate::TokenKind`] enum
66
77
use heck::ToUpperCamelCase;
8-
use proc_macro2::{Ident, Literal, Punct, Spacing, TokenStream};
8+
use proc_macro2::{Ident, Literal, TokenStream};
99
use quote::__private::ext::RepToTokensExt;
1010
use quote::{format_ident, quote};
1111

@@ -62,11 +62,8 @@ impl Token<'_> {
6262
let char = self.shorthand.next().unwrap();
6363
quote! {#char}
6464
} else {
65-
let char = self
66-
.shorthand
67-
.chars()
68-
.map(|c| Punct::new(c, Spacing::Joint));
69-
quote! { #(#char)* }
65+
let tokens: TokenStream = self.shorthand.parse().unwrap();
66+
quote! { #tokens }
7067
}
7168
};
7269
let variant = self.to_ident();

crates/source_gen/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
logos = "0.14.0"
10-
num-derive = "0.4.2"
11-
num-traits = "0.2.19"
12-
rowan = "0.15.15"
9+
logos = "^0.15.0"
10+
num-derive = "^0.4.2"
11+
num-traits = "^0.2.19"
12+
rowan = "^0.16.1"
1313

1414
[build-dependencies]
1515
definitions = { path = "../definitions" }
16-
quote = "1.0.36"
17-
heck = "0.5.0"
18-
proc-macro2 = "1.0.86"
16+
quote = "^1.0.36"
17+
heck = "^0.5.0"
18+
proc-macro2 = "^1.0.86"

src/ast/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ macro_rules! typed_syntax_token {
8585
// Needed so that submodules can import [`typed_syntax_node`] and
8686
// [`typed_syntax_token`]
8787
/// as `super::typed_syntax_{node,token}`.
88-
pub(crate) use {typed_syntax, typed_syntax_node, typed_syntax_token};
88+
pub(crate) use {typed_syntax, typed_syntax_node};
8989

9090
/// Represents a interface for typed AST tokens, akin to [`AstNode`].
9191
pub trait AstToken {

0 commit comments

Comments
 (0)