Skip to content

Commit e4066fb

Browse files
committed
setup taplo and unify + format toml files
1 parent c24b2fa commit e4066fb

File tree

57 files changed

+659
-436
lines changed

Some content is hidden

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

57 files changed

+659
-436
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[alias]
2-
snap = "insta test"
2+
snap = "insta test"
33
xtask = "run --package xtask --"

Cargo.toml

Lines changed: 67 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,81 @@
11
[workspace]
2-
members = [
3-
"crates/*",
4-
"lib/*",
5-
"xtask/codegen"
6-
]
2+
members = ["crates/*", "lib/*", "xtask/codegen"]
73
resolver = "2"
84

95
[workspace.package]
10-
rust-version = "1.71"
11-
12-
6+
authors = ["Supabase Communnity"]
7+
categories = ["development-tools", "postgres", "supabase"]
8+
edition = "2021"
9+
homepage = "https://supabase.com/"
10+
keywords = ["linter", "typechecker", "postgres", "language-server"]
11+
license = "MIT"
12+
repository = "https://github.com/supabase-community/postgres_lsp"
13+
rust-version = "1.82.0"
1314

1415
[workspace.dependencies]
1516
# supporting crates unrelated to postgres
16-
line_index = { path = "./lib/line_index", version = "0.0.0" }
17-
tree_sitter_sql = { path = "./lib/tree_sitter_sql", version = "0.0.0" }
18-
tree-sitter = "0.20.10"
19-
schemars = { version = "0.8.21", features = ["indexmap2", "smallvec"] }
20-
serde = "1.0.195"
21-
serde_json = "1.0.114"
22-
proc-macro2 = "1.0.66"
23-
termcolor = "1.4.1"
24-
unicode-width = "0.1.12"
25-
text-size = "1.1.1"
26-
enumflags2 = "0.7.10"
27-
similar = "2.6.0"
28-
quote = "1.0.33"
29-
syn = "1.0.109"
30-
indexmap = { version = "2.6.0", features = ["serde"] }
31-
crossbeam = "0.8.4"
32-
rayon = "1.10.0"
33-
rustc-hash = "2.0.0"
17+
anyhow = "1.0.92"
3418
biome_deserialize = "0.6.0"
35-
biome_deserialize_macros = "0.6.0"
36-
toml = "0.8.19"
37-
tracing = { version = "0.1.40", default-features = false, features = ["std"] }
38-
tracing-subscriber = "0.3.18"
39-
bpaf = { version = "0.9.15", features = ["derive"] }
40-
tokio = "1.40.0"
41-
ignore = "0.4.23"
42-
anyhow = "1.0.92"
43-
smallvec = { version = "1.13.2", features = ["union", "const_new", "serde"] }
44-
tower-lsp = "0.20.0"
45-
sqlx = { version = "0.8.2", features = [ "runtime-async-std", "tls-rustls", "postgres", "json" ] }
19+
biome_deserialize_macros = "0.6.0"
20+
bpaf = { version = "0.9.15", features = ["derive"] }
21+
crossbeam = "0.8.4"
22+
enumflags2 = "0.7.10"
23+
ignore = "0.4.23"
24+
indexmap = { version = "2.6.0", features = ["serde"] }
25+
line_index = { path = "./lib/line_index", version = "0.0.0" }
26+
proc-macro2 = "1.0.66"
27+
quote = "1.0.33"
28+
rayon = "1.10.0"
29+
rustc-hash = "2.0.0"
30+
schemars = { version = "0.8.21", features = ["indexmap2", "smallvec"] }
31+
serde = "1.0.195"
32+
serde_json = "1.0.114"
33+
similar = "2.6.0"
34+
smallvec = { version = "1.13.2", features = ["union", "const_new", "serde"] }
35+
sqlx = { version = "0.8.2", features = ["runtime-async-std", "tls-rustls", "postgres", "json"] }
36+
syn = "1.0.109"
37+
termcolor = "1.4.1"
38+
text-size = "1.1.1"
39+
tokio = "1.40.0"
40+
toml = "0.8.19"
41+
tower-lsp = "0.20.0"
42+
tracing = { version = "0.1.40", default-features = false, features = ["std"] }
43+
tracing-subscriber = "0.3.18"
44+
tree-sitter = "0.20.10"
45+
tree_sitter_sql = { path = "./lib/tree_sitter_sql", version = "0.0.0" }
46+
unicode-width = "0.1.12"
4647

4748
# postgres specific crates
48-
pg_flags = { path = "./crates/pg_flags", version = "0.0.0" }
49-
pg_lexer = { path = "./crates/pg_lexer", version = "0.0.0" }
50-
pg_lsp_new = { path = "./crates/pg_lsp_new", version = "0.0.0" }
51-
pg_lsp_converters = { path = "./crates/pg_lsp_converters", version = "0.0.0" }
52-
pg_cli = { path = "./crates/pg_cli", version = "0.0.0" }
53-
pg_configuration = { path = "./crates/pg_configuration", version = "0.0.0" }
54-
pg_markup = { path = "./crates/pg_markup", version = "0.0.0" }
55-
pg_console = { path = "./crates/pg_console", version = "0.0.0" }
56-
pg_text_edit = { path = "./crates/pg_text_edit", version = "0.0.0" }
57-
pg_workspace_new = { path = "./crates/pg_workspace_new", version = "0.0.0" }
58-
pg_fs = { path = "./crates/pg_fs", version = "0.0.0" }
59-
pg_diagnostics = { path = "./crates/pg_diagnostics", version = "0.0.0" }
60-
pg_diagnostics_macros = { path = "./crates/pg_diagnostics_macros", version = "0.0.0" }
49+
pg_base_db = { path = "./crates/pg_base_db", version = "0.0.0" }
50+
pg_cli = { path = "./crates/pg_cli", version = "0.0.0" }
51+
pg_commands = { path = "./crates/pg_commands", version = "0.0.0" }
52+
pg_completions = { path = "./crates/pg_completions", version = "0.0.0" }
53+
pg_configuration = { path = "./crates/pg_configuration", version = "0.0.0" }
54+
pg_console = { path = "./crates/pg_console", version = "0.0.0" }
55+
pg_diagnostics = { path = "./crates/pg_diagnostics", version = "0.0.0" }
6156
pg_diagnostics_categories = { path = "./crates/pg_diagnostics_categories", version = "0.0.0" }
62-
pg_lexer_codegen = { path = "./crates/pg_lexer_codegen", version = "0.0.0" }
63-
pg_statement_splitter = { path = "./crates/pg_statement_splitter", version = "0.0.0" }
64-
pg_query_ext = { path = "./crates/pg_query_ext", version = "0.0.0" }
65-
pg_query_ext_codegen = { path = "./crates/pg_query_ext_codegen", version = "0.0.0" }
66-
pg_syntax = { path = "./crates/pg_syntax", version = "0.0.0" }
67-
pg_schema_cache = { path = "./crates/pg_schema_cache", version = "0.0.0" }
68-
pg_commands = { path = "./crates/pg_commands", version = "0.0.0" }
69-
pg_completions = { path = "./crates/pg_completions", version = "0.0.0" }
70-
pg_base_db = { path = "./crates/pg_base_db", version = "0.0.0" }
71-
pg_query_proto_parser = { path = "./crates/pg_query_proto_parser", version = "0.0.0" }
72-
pg_typecheck = { path = "./crates/pg_typecheck", version = "0.0.0" }
73-
pg_type_resolver = { path = "./crates/pg_type_resolver", version = "0.0.0" }
74-
pg_hover = { path = "./crates/pg_hover", version = "0.0.0" }
75-
pg_inlay_hints = { path = "./crates/pg_inlay_hints", version = "0.0.0" }
76-
pg_lint = { path = "./crates/pg_lint", version = "0.0.0" }
77-
pg_workspace = { path = "./crates/pg_workspace", version = "0.0.0" }
57+
pg_diagnostics_macros = { path = "./crates/pg_diagnostics_macros", version = "0.0.0" }
58+
pg_flags = { path = "./crates/pg_flags", version = "0.0.0" }
59+
pg_fs = { path = "./crates/pg_fs", version = "0.0.0" }
60+
pg_hover = { path = "./crates/pg_hover", version = "0.0.0" }
61+
pg_inlay_hints = { path = "./crates/pg_inlay_hints", version = "0.0.0" }
62+
pg_lexer = { path = "./crates/pg_lexer", version = "0.0.0" }
63+
pg_lexer_codegen = { path = "./crates/pg_lexer_codegen", version = "0.0.0" }
64+
pg_lint = { path = "./crates/pg_lint", version = "0.0.0" }
65+
pg_lsp_converters = { path = "./crates/pg_lsp_converters", version = "0.0.0" }
66+
pg_lsp_new = { path = "./crates/pg_lsp_new", version = "0.0.0" }
67+
pg_markup = { path = "./crates/pg_markup", version = "0.0.0" }
68+
pg_query_ext = { path = "./crates/pg_query_ext", version = "0.0.0" }
69+
pg_query_ext_codegen = { path = "./crates/pg_query_ext_codegen", version = "0.0.0" }
70+
pg_query_proto_parser = { path = "./crates/pg_query_proto_parser", version = "0.0.0" }
71+
pg_schema_cache = { path = "./crates/pg_schema_cache", version = "0.0.0" }
72+
pg_statement_splitter = { path = "./crates/pg_statement_splitter", version = "0.0.0" }
73+
pg_syntax = { path = "./crates/pg_syntax", version = "0.0.0" }
74+
pg_text_edit = { path = "./crates/pg_text_edit", version = "0.0.0" }
75+
pg_type_resolver = { path = "./crates/pg_type_resolver", version = "0.0.0" }
76+
pg_typecheck = { path = "./crates/pg_typecheck", version = "0.0.0" }
77+
pg_workspace = { path = "./crates/pg_workspace", version = "0.0.0" }
78+
pg_workspace_new = { path = "./crates/pg_workspace_new", version = "0.0.0" }
7879

7980
pg_test_utils = { path = "./crates/pg_test_utils" }
8081
# parser = { path = "./crates/parser", version = "0.0.0" }

clippy.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
allow-dbg-in-tests = true
2-

crates/pg_base_db/Cargo.toml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
[package]
2-
name = "pg_base_db"
3-
version = "0.0.0"
4-
edition = "2021"
2+
authors.workspace = true
3+
categories.workspace = true
4+
description = "<DESCRIPTION>"
5+
edition.workspace = true
6+
homepage.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
9+
name = "pg_base_db"
10+
repository.workspace = true
11+
version = "0.0.0"
12+
513

614
[dependencies]
7-
text-size.workspace = true
815
line_index.workspace = true
16+
text-size.workspace = true
917

18+
pg_fs.workspace = true
1019
pg_statement_splitter.workspace = true
11-
pg_fs.workspace = true
1220

1321
[dev-dependencies]
1422

crates/pg_cli/Cargo.toml

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
11
[package]
2-
name = "pg_cli"
3-
version = "0.0.0"
4-
edition = "2021"
2+
authors.workspace = true
3+
categories.workspace = true
4+
description = "<DESCRIPTION>"
5+
edition.workspace = true
6+
homepage.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
9+
name = "pg_cli"
10+
repository.workspace = true
11+
version = "0.0.0"
12+
513

614
[dependencies]
15+
anyhow = { workspace = true }
16+
bpaf = { workspace = true, features = ["bright-color"] }
17+
crossbeam = { workspace = true }
18+
dashmap = "5.5.3"
19+
hdrhistogram = { version = "7.5.4", default-features = false }
20+
path-absolutize = { version = "3.1.1", optional = false, features = ["use_unix_paths_on_wasm"] }
21+
pg_configuration = { workspace = true }
722
pg_console = { workspace = true }
8-
pg_flags = { workspace = true }
9-
pg_configuration = { workspace = true }
10-
pg_fs = { workspace = true }
23+
pg_diagnostics = { workspace = true }
24+
pg_flags = { workspace = true }
25+
pg_fs = { workspace = true }
1126
pg_lsp_new = { workspace = true }
12-
pg_workspace_new = { workspace = true }
13-
pg_text_edit = { workspace = true }
14-
path-absolutize = { version = "3.1.1", optional = false, features = ["use_unix_paths_on_wasm"] }
15-
pg_diagnostics = { workspace = true }
16-
crossbeam = { workspace = true }
17-
bpaf = { workspace = true, features = ["bright-color"] }
18-
rayon = { workspace = true }
19-
quick-junit = "0.5.0"
20-
tracing = { workspace = true }
21-
tracing-appender = "0.2.3"
22-
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
23-
tracing-tree = "0.4.0"
24-
hdrhistogram = { version = "7.5.4", default-features = false }
25-
rustc-hash = { workspace = true }
26-
tokio = { workspace = true, features = ["io-std", "io-util", "net", "time", "rt", "sync", "rt-multi-thread", "macros"] }
27-
anyhow = { workspace = true }
28-
dashmap = "5.5.3"
29-
serde = { workspace = true, features = ["derive"] }
30-
serde_json = { workspace = true }
27+
pg_text_edit = { workspace = true }
28+
pg_workspace_new = { workspace = true }
29+
quick-junit = "0.5.0"
30+
rayon = { workspace = true }
31+
rustc-hash = { workspace = true }
32+
serde = { workspace = true, features = ["derive"] }
33+
serde_json = { workspace = true }
34+
tokio = { workspace = true, features = ["io-std", "io-util", "net", "time", "rt", "sync", "rt-multi-thread", "macros"] }
35+
tracing = { workspace = true }
36+
tracing-appender = "0.2.3"
37+
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
38+
tracing-tree = "0.4.0"
3139

3240
[target.'cfg(unix)'.dependencies]
3341
libc = "0.2.161"

crates/pg_commands/Cargo.toml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
[package]
2-
name = "pg_commands"
3-
version = "0.0.0"
4-
edition = "2021"
2+
authors.workspace = true
3+
categories.workspace = true
4+
description = "<DESCRIPTION>"
5+
edition.workspace = true
6+
homepage.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
9+
name = "pg_commands"
10+
repository.workspace = true
11+
version = "0.0.0"
12+
513

614
[dependencies]
15+
anyhow = "1.0.62"
16+
async-std = "1.12.0"
17+
sqlx.workspace = true
718
text-size.workspace = true
8-
async-std = "1.12.0"
9-
anyhow = "1.0.62"
10-
sqlx.workspace = true
1119

1220
[lib]
1321
doctest = false

crates/pg_commands/src/execute_statement.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ impl ExecuteStatementCommand {
1515
if let Some(conn) = conn {
1616
match conn.execute(self.statement.as_str()).await {
1717
Ok(res) => Ok(res),
18-
Err(e) => {
19-
Err(anyhow::anyhow!(e.to_string()))
20-
}
18+
Err(e) => Err(anyhow::anyhow!(e.to_string())),
2119
}
2220
} else {
2321
Err(anyhow::anyhow!("No connection to database".to_string()))

crates/pg_completions/Cargo.toml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
[package]
2-
name = "pg_completions"
3-
version = "0.0.0"
4-
edition = "2021"
2+
authors.workspace = true
3+
categories.workspace = true
4+
description = "<DESCRIPTION>"
5+
edition.workspace = true
6+
homepage.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
9+
name = "pg_completions"
10+
repository.workspace = true
11+
version = "0.0.0"
12+
513

614
[dependencies]
715
async-std = "1.12.0"
816

917
text-size.workspace = true
1018

11-
tree-sitter.workspace = true
12-
tree_sitter_sql.workspace = true
1319
pg_schema_cache.workspace = true
14-
pg_test_utils.workspace = true
20+
pg_test_utils.workspace = true
21+
tree-sitter.workspace = true
22+
tree_sitter_sql.workspace = true
1523

1624
sqlx.workspace = true
1725

crates/pg_configuration/Cargo.toml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
[package]
2-
name = "pg_configuration"
3-
version = "0.0.0"
4-
edition = "2021"
2+
authors.workspace = true
3+
categories.workspace = true
4+
description = "<DESCRIPTION>"
5+
edition.workspace = true
6+
homepage.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
9+
name = "pg_configuration"
10+
repository.workspace = true
11+
version = "0.0.0"
12+
513

614
[dependencies]
15+
biome_deserialize = { workspace = true }
16+
biome_deserialize_macros = { workspace = true }
17+
bpaf = { workspace = true }
18+
pg_console = { workspace = true }
19+
pg_diagnostics = { workspace = true }
720
schemars = { workspace = true, features = ["indexmap1"], optional = true }
821
serde = { workspace = true, features = ["derive"] }
922
serde_json = { workspace = true, features = ["raw_value"] }
10-
biome_deserialize = { workspace = true }
11-
text-size = { workspace = true }
12-
biome_deserialize_macros = { workspace = true }
13-
bpaf = { workspace = true }
14-
pg_diagnostics = { workspace = true }
15-
pg_console = { workspace = true }
16-
toml = { workspace = true }
23+
text-size = { workspace = true }
24+
toml = { workspace = true }
1725

1826
[lib]
1927
doctest = false
2028

2129
[features]
22-
schema = [
23-
"dep:schemars"
24-
]
25-
30+
schema = ["dep:schemars"]

crates/pg_console/Cargo.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
[package]
2-
name = "pg_console"
3-
version = "0.0.0"
4-
edition = "2021"
2+
authors.workspace = true
3+
categories.workspace = true
4+
description = "<DESCRIPTION>"
5+
edition.workspace = true
6+
homepage.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
9+
name = "pg_console"
10+
repository.workspace = true
11+
version = "0.0.0"
12+
513

614
[dependencies]
7-
pg_markup = { workspace = true }
8-
text-size = { workspace = true }
15+
pg_markup = { workspace = true }
16+
text-size = { workspace = true }
917

1018
schemars = { workspace = true, optional = true }
1119
serde = { workspace = true, optional = true, features = ["derive"] }
@@ -21,4 +29,3 @@ serde_markup = ["serde", "schemars"]
2129

2230
[lib]
2331
doctest = false
24-

0 commit comments

Comments
 (0)