Skip to content

Commit 6e6cfb2

Browse files
committed
Merge branch 'main' into fix/crash-281
2 parents ffb0509 + 69b21e6 commit 6e6cfb2

File tree

15 files changed

+355
-94
lines changed

15 files changed

+355
-94
lines changed

.github/workflows/deploy_docs.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: Build and Deploy Documentation
2+
23
on:
3-
push:
4-
branches:
5-
- main
6-
paths:
7-
- 'docs/**'
4+
release:
5+
types: [released]
86
workflow_dispatch:
7+
98
permissions:
109
contents: write
1110
pages: write

.github/workflows/pull_request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414
- "rustfmt.toml"
1515
# or in js packages
1616
- "packages/**"
17+
# or in workflows
18+
- ".github/workflows/**"
1719

1820
concurrency:
1921
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,17 @@ jobs:
5757
env:
5858
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
5959

60+
- name: Set version name
61+
run: echo "version=$(git cliff --bumped-version)" >> "$GITHUB_ENV"
62+
6063
- name: 🛠️ Run Build
6164
run: cargo build -p pgt_cli --release --target ${{ matrix.config.target }}
65+
env:
66+
# Strip all debug symbols from the resulting binaries
67+
RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
68+
# Inline the version in the CLI binary
69+
PGT_VERSION: ${{ env.version }}
70+
6271

6372
# windows is a special snowflake too, it saves binaries as .exe
6473
- name: 👦 Name the Binary

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ strum = { version = "0.27.1", features = ["derive"] }
4444
sqlx = { version = "0.8.2", features = ["runtime-tokio", "runtime-async-std", "postgres", "json"] }
4545
syn = "1.0.109"
4646
termcolor = "1.4.1"
47+
test-log = "0.2.17"
4748
tokio = { version = "1.40.0", features = ["full"] }
4849
tower-lsp = "0.20.0"
4950
tracing = { version = "0.1.40", default-features = false, features = ["std"] }

crates/pgt_analyse/Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ version = "0.0.0"
1313

1414

1515
[dependencies]
16-
pgt_console.workspace = true
17-
pgt_diagnostics.workspace = true
18-
pgt_query_ext.workspace = true
19-
pgt_schema_cache.workspace = true
20-
rustc-hash = { workspace = true }
16+
pgt_console.workspace = true
17+
pgt_diagnostics.workspace = true
18+
pgt_query_ext.workspace = true
19+
rustc-hash = { workspace = true }
2120

2221
biome_deserialize = { workspace = true, optional = true }
2322
biome_deserialize_macros = { workspace = true, optional = true }

crates/pgt_diagnostics/src/serde.rs

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ mod tests {
374374
use std::io;
375375

376376
use pgt_text_size::{TextRange, TextSize};
377-
use serde_json::{Value, json};
378377

379378
use crate::{
380379
self as pgt_diagnostics, {Advices, LogCategory, Visit},
@@ -426,55 +425,55 @@ mod tests {
426425
}
427426
}
428427

429-
fn serialized() -> Value {
430-
let advices = json!([
431-
{
432-
"log": [
433-
"warn",
434-
[
435-
{
436-
"elements": [],
437-
"content": "log"
438-
}
439-
]
440-
]
441-
}
442-
]);
443-
444-
json!({
445-
"category": "internalError/io",
446-
"severity": "warning",
447-
"description": "text description",
448-
"message": [
449-
{
450-
"elements": [
451-
"Emphasis"
452-
],
453-
"content": "markup message"
454-
}
455-
],
456-
"advices": {
457-
"advices": advices
458-
},
459-
"verbose_advices": {
460-
"advices": advices
461-
},
462-
"location": {
463-
"path": {
464-
"file": "path"
465-
},
466-
"sourceCode": "source_code",
467-
"span": [
468-
0,
469-
6
470-
]
471-
},
472-
"tags": [
473-
"internal"
474-
],
475-
"source": null
476-
})
477-
}
428+
// fn serialized() -> Value {
429+
// let advices = json!([
430+
// {
431+
// "log": [
432+
// "warn",
433+
// [
434+
// {
435+
// "elements": [],
436+
// "content": "log"
437+
// }
438+
// ]
439+
// ]
440+
// }
441+
// ]);
442+
//
443+
// json!({
444+
// "category": "internalError/io",
445+
// "severity": "warning",
446+
// "description": "text description",
447+
// "message": [
448+
// {
449+
// "elements": [
450+
// "Emphasis"
451+
// ],
452+
// "content": "markup message"
453+
// }
454+
// ],
455+
// "advices": {
456+
// "advices": advices
457+
// },
458+
// "verbose_advices": {
459+
// "advices": advices
460+
// },
461+
// "location": {
462+
// "path": {
463+
// "file": "path"
464+
// },
465+
// "sourceCode": "source_code",
466+
// "span": [
467+
// 0,
468+
// 6
469+
// ]
470+
// },
471+
// "tags": [
472+
// "internal"
473+
// ],
474+
// "source": null
475+
// })
476+
// }
478477

479478
// #[test]
480479
// fn test_serialize() {

crates/pgt_lsp/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ tracing = { workspace = true, features = ["attributes"] }
3535
[dev-dependencies]
3636
pgt_test_utils = { workspace = true }
3737
sqlx = { workspace = true }
38+
test-log = { workspace = true }
3839
tokio = { workspace = true, features = ["macros"] }
3940
tower = { version = "0.4.13", features = ["timeout"] }
4041

0 commit comments

Comments
 (0)