Skip to content

Commit ec2c407

Browse files
Merge branch 'main' into fix/duplicate-cols
2 parents dbd8ad4 + 83934ed commit ec2c407

File tree

55 files changed

+1534
-702192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1534
-702192
lines changed

.github/workflows/pull_request.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ jobs:
112112
sleep 1
113113
done
114114
115+
- name: Install tree-sitter-cli
116+
run: cargo install tree-sitter-cli
117+
115118
- name: Setup sqlx-cli
116119
run: cargo install sqlx-cli
117120

@@ -167,12 +170,15 @@ jobs:
167170
- name: Setup Postgres
168171
uses: ./.github/actions/setup-postgres
169172

173+
- name: Install tree-sitter-cli
174+
run: cargo install tree-sitter-cli
175+
170176
- name: Run tests
171177
run: cargo test --workspace
172178

173179
test-js-bindings:
174180
name:
175-
Test JS Bindings
181+
Test JS Packages
176182
# use the same image we use for compiling
177183
runs-on: ubuntu-22.04
178184
services:
@@ -195,18 +201,23 @@ jobs:
195201
uses: moonrepo/setup-rust@v1
196202
with:
197203
cache-base: main
204+
- name: Install tree-sitter-cli
205+
run: cargo install tree-sitter-cli
198206
- name: Build main binary
199207
run: cargo build -p pgt_cli --release
200208
- name: Setup Bun
201209
uses: oven-sh/setup-bun@v2
202210
- name: Install JS dependencies
203211
run: bun install
204-
- name: Build TypeScript code
212+
- name: Build backend-jsonrpc
205213
working-directory: packages/@postgrestools/backend-jsonrpc
206214
run: bun run build
207-
- name: Run JS tests
215+
- name: Run backend-jsonrpc test
208216
working-directory: packages/@postgrestools/backend-jsonrpc
209217
run: bun run test
218+
- name: Run cli test
219+
working-directory: packages/@postgrestools/postgrestools
220+
run: bun run test
210221

211222
codegen:
212223
name: Check Codegen
@@ -233,6 +244,8 @@ jobs:
233244
cache-base: main
234245
env:
235246
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
247+
- name: Install tree-sitter-cli
248+
run: cargo install tree-sitter-cli
236249
- name: Ensure RustFMT on nightly toolchain
237250
run: rustup component add rustfmt --toolchain nightly
238251
- name: echo toolchain

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ node_modules/
2626
.claude-session-id
2727

2828
squawk/
29+
30+
# Auto generated treesitter files
31+
crates/pgt_treesitter_grammar/src/grammar.json
32+
crates/pgt_treesitter_grammar/src/node-types.json
33+
crates/pgt_treesitter_grammar/src/parser.c

.sqlx/query-66d92238c94b5f1c99fbf068a0b5cf4c296b594fe9e6cebbdc382acde73f4fb9.json renamed to .sqlx/query-2b27b190ecaed2d961577fcaaf5875a1842ca09da63a7fe68996409e21e7f779.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.lock

Lines changed: 76 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pgt_console = { path = "./crates/pgt_console", version = "0.0.0"
6969
pgt_diagnostics = { path = "./crates/pgt_diagnostics", version = "0.0.0" }
7070
pgt_diagnostics_categories = { path = "./crates/pgt_diagnostics_categories", version = "0.0.0" }
7171
pgt_diagnostics_macros = { path = "./crates/pgt_diagnostics_macros", version = "0.0.0" }
72-
pgt_flags = { path = "./crates/pgt_flags", version = "0.0.0" }
72+
pgt_env = { path = "./crates/pgt_env", version = "0.0.0" }
7373
pgt_fs = { path = "./crates/pgt_fs", version = "0.0.0" }
7474
pgt_hover = { path = "./crates/pgt_hover", version = "0.0.0" }
7575
pgt_lexer = { path = "./crates/pgt_lexer", version = "0.0.0" }

crates/pgt_cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pgt_analyse = { workspace = true }
2424
pgt_configuration = { workspace = true }
2525
pgt_console = { workspace = true }
2626
pgt_diagnostics = { workspace = true }
27-
pgt_flags = { workspace = true }
27+
pgt_env = { workspace = true }
2828
pgt_fs = { workspace = true }
2929
pgt_lsp = { workspace = true }
3030
pgt_text_edit = { workspace = true }

crates/pgt_cli/src/commands/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::commands::daemon::default_pgt_log_path;
22
use crate::{CliDiagnostic, CliSession};
3-
use pgt_flags::pgt_env;
3+
use pgt_env::pgt_env;
44
use std::fs::{create_dir, remove_dir_all};
55
use std::path::PathBuf;
66

crates/pgt_cli/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use commands::check::CheckCommandPayload;
1010
use pgt_console::{ColorMode, Console};
1111
use pgt_fs::OsFileSystem;
1212
use pgt_workspace::{App, DynRef, Workspace, WorkspaceRef};
13-
use std::env;
1413

1514
mod changed;
1615
mod cli_options;
@@ -32,10 +31,7 @@ pub use panic::setup_panic_handler;
3231
pub use reporter::{DiagnosticsPayload, Reporter, ReporterVisitor, TraversalSummary};
3332
pub use service::{SocketTransport, open_transport};
3433

35-
pub(crate) const VERSION: &str = match option_env!("PGT_VERSION") {
36-
Some(version) => version,
37-
None => env!("CARGO_PKG_VERSION"),
38-
};
34+
pub(crate) use pgt_env::VERSION;
3935

4036
/// Global context for an execution of the CLI
4137
pub struct CliSession<'app> {

0 commit comments

Comments
 (0)