Skip to content

setup taplo and unify + format toml files #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[alias]
snap = "insta test"
snap = "insta test"
xtask = "run --package xtask --"
133 changes: 67 additions & 66 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,80 +1,81 @@
[workspace]
members = [
"crates/*",
"lib/*",
"xtask/codegen"
]
members = ["crates/*", "lib/*", "xtask/codegen"]
resolver = "2"

[workspace.package]
rust-version = "1.71"


authors = ["Supabase Communnity"]
categories = ["development-tools", "postgres", "supabase"]
edition = "2021"
homepage = "https://supabase.com/"
keywords = ["linter", "typechecker", "postgres", "language-server"]
license = "MIT"
repository = "https://github.com/supabase-community/postgres_lsp"
rust-version = "1.82.0"

[workspace.dependencies]
# supporting crates unrelated to postgres
line_index = { path = "./lib/line_index", version = "0.0.0" }
tree_sitter_sql = { path = "./lib/tree_sitter_sql", version = "0.0.0" }
tree-sitter = "0.20.10"
schemars = { version = "0.8.21", features = ["indexmap2", "smallvec"] }
serde = "1.0.195"
serde_json = "1.0.114"
proc-macro2 = "1.0.66"
termcolor = "1.4.1"
unicode-width = "0.1.12"
text-size = "1.1.1"
enumflags2 = "0.7.10"
similar = "2.6.0"
quote = "1.0.33"
syn = "1.0.109"
indexmap = { version = "2.6.0", features = ["serde"] }
crossbeam = "0.8.4"
rayon = "1.10.0"
rustc-hash = "2.0.0"
anyhow = "1.0.92"
biome_deserialize = "0.6.0"
biome_deserialize_macros = "0.6.0"
toml = "0.8.19"
tracing = { version = "0.1.40", default-features = false, features = ["std"] }
tracing-subscriber = "0.3.18"
bpaf = { version = "0.9.15", features = ["derive"] }
tokio = "1.40.0"
ignore = "0.4.23"
anyhow = "1.0.92"
smallvec = { version = "1.13.2", features = ["union", "const_new", "serde"] }
tower-lsp = "0.20.0"
sqlx = { version = "0.8.2", features = [ "runtime-async-std", "tls-rustls", "postgres", "json" ] }
biome_deserialize_macros = "0.6.0"
bpaf = { version = "0.9.15", features = ["derive"] }
crossbeam = "0.8.4"
enumflags2 = "0.7.10"
ignore = "0.4.23"
indexmap = { version = "2.6.0", features = ["serde"] }
line_index = { path = "./lib/line_index", version = "0.0.0" }
proc-macro2 = "1.0.66"
quote = "1.0.33"
rayon = "1.10.0"
rustc-hash = "2.0.0"
schemars = { version = "0.8.21", features = ["indexmap2", "smallvec"] }
serde = "1.0.195"
serde_json = "1.0.114"
similar = "2.6.0"
smallvec = { version = "1.13.2", features = ["union", "const_new", "serde"] }
sqlx = { version = "0.8.2", features = ["runtime-async-std", "tls-rustls", "postgres", "json"] }
syn = "1.0.109"
termcolor = "1.4.1"
text-size = "1.1.1"
tokio = "1.40.0"
toml = "0.8.19"
tower-lsp = "0.20.0"
tracing = { version = "0.1.40", default-features = false, features = ["std"] }
tracing-subscriber = "0.3.18"
tree-sitter = "0.20.10"
tree_sitter_sql = { path = "./lib/tree_sitter_sql", version = "0.0.0" }
unicode-width = "0.1.12"

# postgres specific crates
pg_flags = { path = "./crates/pg_flags", version = "0.0.0" }
pg_lexer = { path = "./crates/pg_lexer", version = "0.0.0" }
pg_lsp_new = { path = "./crates/pg_lsp_new", version = "0.0.0" }
pg_lsp_converters = { path = "./crates/pg_lsp_converters", version = "0.0.0" }
pg_cli = { path = "./crates/pg_cli", version = "0.0.0" }
pg_configuration = { path = "./crates/pg_configuration", version = "0.0.0" }
pg_markup = { path = "./crates/pg_markup", version = "0.0.0" }
pg_console = { path = "./crates/pg_console", version = "0.0.0" }
pg_text_edit = { path = "./crates/pg_text_edit", version = "0.0.0" }
pg_workspace_new = { path = "./crates/pg_workspace_new", version = "0.0.0" }
pg_fs = { path = "./crates/pg_fs", version = "0.0.0" }
pg_diagnostics = { path = "./crates/pg_diagnostics", version = "0.0.0" }
pg_diagnostics_macros = { path = "./crates/pg_diagnostics_macros", version = "0.0.0" }
pg_base_db = { path = "./crates/pg_base_db", version = "0.0.0" }
pg_cli = { path = "./crates/pg_cli", version = "0.0.0" }
pg_commands = { path = "./crates/pg_commands", version = "0.0.0" }
pg_completions = { path = "./crates/pg_completions", version = "0.0.0" }
pg_configuration = { path = "./crates/pg_configuration", version = "0.0.0" }
pg_console = { path = "./crates/pg_console", version = "0.0.0" }
pg_diagnostics = { path = "./crates/pg_diagnostics", version = "0.0.0" }
pg_diagnostics_categories = { path = "./crates/pg_diagnostics_categories", version = "0.0.0" }
pg_lexer_codegen = { path = "./crates/pg_lexer_codegen", version = "0.0.0" }
pg_statement_splitter = { path = "./crates/pg_statement_splitter", version = "0.0.0" }
pg_query_ext = { path = "./crates/pg_query_ext", version = "0.0.0" }
pg_query_ext_codegen = { path = "./crates/pg_query_ext_codegen", version = "0.0.0" }
pg_syntax = { path = "./crates/pg_syntax", version = "0.0.0" }
pg_schema_cache = { path = "./crates/pg_schema_cache", version = "0.0.0" }
pg_commands = { path = "./crates/pg_commands", version = "0.0.0" }
pg_completions = { path = "./crates/pg_completions", version = "0.0.0" }
pg_base_db = { path = "./crates/pg_base_db", version = "0.0.0" }
pg_query_proto_parser = { path = "./crates/pg_query_proto_parser", version = "0.0.0" }
pg_typecheck = { path = "./crates/pg_typecheck", version = "0.0.0" }
pg_type_resolver = { path = "./crates/pg_type_resolver", version = "0.0.0" }
pg_hover = { path = "./crates/pg_hover", version = "0.0.0" }
pg_inlay_hints = { path = "./crates/pg_inlay_hints", version = "0.0.0" }
pg_lint = { path = "./crates/pg_lint", version = "0.0.0" }
pg_workspace = { path = "./crates/pg_workspace", version = "0.0.0" }
pg_diagnostics_macros = { path = "./crates/pg_diagnostics_macros", version = "0.0.0" }
pg_flags = { path = "./crates/pg_flags", version = "0.0.0" }
pg_fs = { path = "./crates/pg_fs", version = "0.0.0" }
pg_hover = { path = "./crates/pg_hover", version = "0.0.0" }
pg_inlay_hints = { path = "./crates/pg_inlay_hints", version = "0.0.0" }
pg_lexer = { path = "./crates/pg_lexer", version = "0.0.0" }
pg_lexer_codegen = { path = "./crates/pg_lexer_codegen", version = "0.0.0" }
pg_lint = { path = "./crates/pg_lint", version = "0.0.0" }
pg_lsp_converters = { path = "./crates/pg_lsp_converters", version = "0.0.0" }
pg_lsp_new = { path = "./crates/pg_lsp_new", version = "0.0.0" }
pg_markup = { path = "./crates/pg_markup", version = "0.0.0" }
pg_query_ext = { path = "./crates/pg_query_ext", version = "0.0.0" }
pg_query_ext_codegen = { path = "./crates/pg_query_ext_codegen", version = "0.0.0" }
pg_query_proto_parser = { path = "./crates/pg_query_proto_parser", version = "0.0.0" }
pg_schema_cache = { path = "./crates/pg_schema_cache", version = "0.0.0" }
pg_statement_splitter = { path = "./crates/pg_statement_splitter", version = "0.0.0" }
pg_syntax = { path = "./crates/pg_syntax", version = "0.0.0" }
pg_text_edit = { path = "./crates/pg_text_edit", version = "0.0.0" }
pg_type_resolver = { path = "./crates/pg_type_resolver", version = "0.0.0" }
pg_typecheck = { path = "./crates/pg_typecheck", version = "0.0.0" }
pg_workspace = { path = "./crates/pg_workspace", version = "0.0.0" }
pg_workspace_new = { path = "./crates/pg_workspace_new", version = "0.0.0" }

pg_test_utils = { path = "./crates/pg_test_utils" }
# parser = { path = "./crates/parser", version = "0.0.0" }
Expand Down
1 change: 0 additions & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
allow-dbg-in-tests = true

18 changes: 13 additions & 5 deletions crates/pg_base_db/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
[package]
name = "pg_base_db"
version = "0.0.0"
edition = "2021"
authors.workspace = true
categories.workspace = true
description = "<DESCRIPTION>"
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
name = "pg_base_db"
repository.workspace = true
version = "0.0.0"


[dependencies]
text-size.workspace = true
line_index.workspace = true
text-size.workspace = true

pg_fs.workspace = true
pg_statement_splitter.workspace = true
pg_fs.workspace = true

[dev-dependencies]

Expand Down
58 changes: 33 additions & 25 deletions crates/pg_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
[package]
name = "pg_cli"
version = "0.0.0"
edition = "2021"
authors.workspace = true
categories.workspace = true
description = "<DESCRIPTION>"
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
name = "pg_cli"
repository.workspace = true
version = "0.0.0"


[dependencies]
anyhow = { workspace = true }
bpaf = { workspace = true, features = ["bright-color"] }
crossbeam = { workspace = true }
dashmap = "5.5.3"
hdrhistogram = { version = "7.5.4", default-features = false }
path-absolutize = { version = "3.1.1", optional = false, features = ["use_unix_paths_on_wasm"] }
pg_configuration = { workspace = true }
pg_console = { workspace = true }
pg_flags = { workspace = true }
pg_configuration = { workspace = true }
pg_fs = { workspace = true }
pg_diagnostics = { workspace = true }
pg_flags = { workspace = true }
pg_fs = { workspace = true }
pg_lsp_new = { workspace = true }
pg_workspace_new = { workspace = true }
pg_text_edit = { workspace = true }
path-absolutize = { version = "3.1.1", optional = false, features = ["use_unix_paths_on_wasm"] }
pg_diagnostics = { workspace = true }
crossbeam = { workspace = true }
bpaf = { workspace = true, features = ["bright-color"] }
rayon = { workspace = true }
quick-junit = "0.5.0"
tracing = { workspace = true }
tracing-appender = "0.2.3"
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
tracing-tree = "0.4.0"
hdrhistogram = { version = "7.5.4", default-features = false }
rustc-hash = { workspace = true }
tokio = { workspace = true, features = ["io-std", "io-util", "net", "time", "rt", "sync", "rt-multi-thread", "macros"] }
anyhow = { workspace = true }
dashmap = "5.5.3"
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
pg_text_edit = { workspace = true }
pg_workspace_new = { workspace = true }
quick-junit = "0.5.0"
rayon = { workspace = true }
rustc-hash = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["io-std", "io-util", "net", "time", "rt", "sync", "rt-multi-thread", "macros"] }
tracing = { workspace = true }
tracing-appender = "0.2.3"
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
tracing-tree = "0.4.0"

[target.'cfg(unix)'.dependencies]
libc = "0.2.161"
Expand Down
20 changes: 14 additions & 6 deletions crates/pg_commands/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
[package]
name = "pg_commands"
version = "0.0.0"
edition = "2021"
authors.workspace = true
categories.workspace = true
description = "<DESCRIPTION>"
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
name = "pg_commands"
repository.workspace = true
version = "0.0.0"


[dependencies]
anyhow = "1.0.62"
async-std = "1.12.0"
sqlx.workspace = true
text-size.workspace = true
async-std = "1.12.0"
anyhow = "1.0.62"
sqlx.workspace = true

[lib]
doctest = false
Expand Down
4 changes: 1 addition & 3 deletions crates/pg_commands/src/execute_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ impl ExecuteStatementCommand {
if let Some(conn) = conn {
match conn.execute(self.statement.as_str()).await {
Ok(res) => Ok(res),
Err(e) => {
Err(anyhow::anyhow!(e.to_string()))
}
Err(e) => Err(anyhow::anyhow!(e.to_string())),
}
} else {
Err(anyhow::anyhow!("No connection to database".to_string()))
Expand Down
20 changes: 14 additions & 6 deletions crates/pg_completions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
[package]
name = "pg_completions"
version = "0.0.0"
edition = "2021"
authors.workspace = true
categories.workspace = true
description = "<DESCRIPTION>"
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
name = "pg_completions"
repository.workspace = true
version = "0.0.0"


[dependencies]
async-std = "1.12.0"

text-size.workspace = true

tree-sitter.workspace = true
tree_sitter_sql.workspace = true
pg_schema_cache.workspace = true
pg_test_utils.workspace = true
pg_test_utils.workspace = true
tree-sitter.workspace = true
tree_sitter_sql.workspace = true

sqlx.workspace = true

Expand Down
33 changes: 19 additions & 14 deletions crates/pg_configuration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
[package]
name = "pg_configuration"
version = "0.0.0"
edition = "2021"
authors.workspace = true
categories.workspace = true
description = "<DESCRIPTION>"
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
name = "pg_configuration"
repository.workspace = true
version = "0.0.0"


[dependencies]
biome_deserialize = { workspace = true }
biome_deserialize_macros = { workspace = true }
bpaf = { workspace = true }
pg_console = { workspace = true }
pg_diagnostics = { workspace = true }
schemars = { workspace = true, features = ["indexmap1"], optional = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["raw_value"] }
biome_deserialize = { workspace = true }
text-size = { workspace = true }
biome_deserialize_macros = { workspace = true }
bpaf = { workspace = true }
pg_diagnostics = { workspace = true }
pg_console = { workspace = true }
toml = { workspace = true }
text-size = { workspace = true }
toml = { workspace = true }

[lib]
doctest = false

[features]
schema = [
"dep:schemars"
]

schema = ["dep:schemars"]
19 changes: 13 additions & 6 deletions crates/pg_console/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
[package]
name = "pg_console"
version = "0.0.0"
edition = "2021"
authors.workspace = true
categories.workspace = true
description = "<DESCRIPTION>"
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
name = "pg_console"
repository.workspace = true
version = "0.0.0"


[dependencies]
pg_markup = { workspace = true }
text-size = { workspace = true }
pg_markup = { workspace = true }
text-size = { workspace = true }

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

[lib]
doctest = false

Loading
Loading