diff --git a/.claude/skills/fix-issue/references/platform-linux.md b/.claude/skills/fix-issue/references/platform-linux.md index 7a8e7abf7a..89df743bd5 100644 --- a/.claude/skills/fix-issue/references/platform-linux.md +++ b/.claude/skills/fix-issue/references/platform-linux.md @@ -29,7 +29,7 @@ Pass `--platform linux`, which a Linux machine picks by default. Every step runs | Step | When | | --- | --- | -| `setup` | a new tree; `linux/meson.build`, `linux/meson_options.txt` or a file under `linux/data/` changed | +| `setup` | a new tree; `linux/meson.build`, `linux/meson.options` or a file under `linux/data/` changed | | `build` | always | | `test [filter]` | always, for each crate you changed | | `test` | before the pull request: every suite, as the CI fast job runs them | diff --git a/.claude/skills/fix-issue/references/verification-linux.md b/.claude/skills/fix-issue/references/verification-linux.md index d34d389934..69f8d57548 100644 --- a/.claude/skills/fix-issue/references/verification-linux.md +++ b/.claude/skills/fix-issue/references/verification-linux.md @@ -12,7 +12,7 @@ Cargo prints one "test result:" line per test binary and never adds them up, thr - **The first build of a tree downloads every crate** into `linux/_build/cargo-home` and builds about 20 GB into `linux/_build/cargo-target`. No network means a failed build that is not the change; `--offline` sets `CARGO_NET_OFFLINE` once the tree has its crates. - **`cargo` not on PATH** in a shell that never read the user's profile: the wrapper sources `~/.cargo/env`, which is where rustup puts it. Run by hand, `meson devenv cargo ...` fails with "Command not found: cargo". - **A schema or desktop file edit needs `build`**, which recompiles the GSettings schema; a stale one aborts the app on its first settings read. -- **`setup` again after a merge** from the base, or after `linux/meson.build`, `linux/meson_options.txt` or a template under `linux/data/` changed. A new `.rs` file needs nothing: Cargo finds modules itself. +- **`setup` again after a merge** from the base, or after `linux/meson.build`, `linux/meson.options` or a template under `linux/data/` changed. A new `.rs` file needs nothing: Cargo finds modules itself. ## Tests diff --git a/.github/workflows/linux-packages.yml b/.github/workflows/linux-packages.yml index cfd60fbdf0..c2accd3165 100644 --- a/.github/workflows/linux-packages.yml +++ b/.github/workflows/linux-packages.yml @@ -21,7 +21,7 @@ on: - "linux/Cargo.toml" - "linux/Cargo.lock" - "linux/meson.build" - - "linux/meson_options.txt" + - "linux/meson.options" - "linux/crates/**/meson.build" - "linux/data/**/meson.build" - "linux/po/meson.build" diff --git a/linux/ARCHITECTURE.md b/linux/ARCHITECTURE.md index ec06b97b04..903242489a 100644 --- a/linux/ARCHITECTURE.md +++ b/linux/ARCHITECTURE.md @@ -65,11 +65,11 @@ The driver registry is built once, by `build_registry` in `crates/app/src/lib.rs ```rust fn build_registry() -> DriverRegistry { let mut r = DriverRegistry::new(); - r.register(Arc::new(drivers_clickhouse::ClickhouseDriver)); - r.register(Arc::new(drivers_mssql::MssqlDriver)); - r.register(Arc::new(drivers_mysql::MysqlDriver)); - r.register(Arc::new(drivers_postgres::PgDriver)); - r.register(Arc::new(drivers_sqlite::SqliteDriver)); + r.register(Arc::new(tablepro_driver_clickhouse::ClickhouseDriver)); + r.register(Arc::new(tablepro_driver_mssql::MssqlDriver)); + r.register(Arc::new(tablepro_driver_mysql::MysqlDriver)); + r.register(Arc::new(tablepro_driver_postgres::PgDriver)); + r.register(Arc::new(tablepro_driver_sqlite::SqliteDriver)); r } ``` diff --git a/linux/Cargo.toml b/linux/Cargo.toml index e941cd0bf6..d61ec72a1d 100644 --- a/linux/Cargo.toml +++ b/linux/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -resolver = "2" +resolver = "3" members = [ "crates/app", "crates/core", @@ -23,6 +23,18 @@ license = "AGPL-3.0-or-later" publish = false [workspace.dependencies] +tablepro-core = { path = "crates/core" } +tablepro-driver-clickhouse = { path = "crates/drivers/clickhouse" } +tablepro-driver-mssql = { path = "crates/drivers/mssql" } +tablepro-driver-mysql = { path = "crates/drivers/mysql" } +tablepro-driver-postgres = { path = "crates/drivers/postgres" } +tablepro-driver-sqlite = { path = "crates/drivers/sqlite" } +tablepro-net = { path = "crates/net" } +tablepro-session = { path = "crates/session" } +tablepro-ssh = { path = "crates/ssh" } +tablepro-storage = { path = "crates/storage" } +tablepro-test-fixtures = { path = "crates/test-fixtures" } +tablepro-test-support = { path = "crates/test-support" } async-trait = "0.1" thiserror = "2" serde = { version = "1", features = ["derive"] } @@ -67,6 +79,7 @@ rustls-native-certs = "0.8" rustls-platform-verifier = "0.7" pem-rfc7468 = { version = "1", features = ["alloc"] } socket2 = { version = "0.6", features = ["all"] } +rustix = { version = "1.1", default-features = false, features = ["std"] } tokio-rustls = { version = "0.26", default-features = false, features = ["aws_lc_rs", "logging", "tls12"] } hyper-util = { version = "0.1", features = ["client-legacy", "http1", "tokio"] } hyper-rustls = { version = "0.27", default-features = false, features = ["aws-lc-rs", "http1", "tls12"] } @@ -105,6 +118,7 @@ allow_attributes = "deny" allow_attributes_without_reason = "deny" ignore_without_reason = "deny" too_many_lines = "deny" +self_named_module_files = "deny" [profile.release] lto = "fat" diff --git a/linux/crates/app/Cargo.toml b/linux/crates/app/Cargo.toml index 01fe197258..e29064f3fc 100644 --- a/linux/crates/app/Cargo.toml +++ b/linux/crates/app/Cargo.toml @@ -3,64 +3,50 @@ name = "tablepro" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false +publish.workspace = true [lib] name = "tablepro_app" -path = "src/lib.rs" - -[[bin]] -name = "tablepro" -path = "src/main.rs" [[test]] name = "startup" -path = "tests/startup.rs" harness = false [[test]] name = "i18n_catalog" -path = "tests/i18n_catalog.rs" harness = false [[test]] name = "logging" -path = "tests/logging.rs" harness = false # A panic hook is process-wide and the crash ends the process, so each # case runs in a child of the binary. [[test]] name = "crash_report" -path = "tests/crash_report.rs" harness = false # These start the application, which GTK allows only on the process's # main thread, so they run without the test harness. [[test]] name = "application_uniqueness" -path = "tests/application_uniqueness.rs" harness = false [[test]] name = "application_lifecycle" -path = "tests/application_lifecycle.rs" harness = false # D-Bus starts the binary, which opens its windows on GTK's main thread. [[test]] name = "open_files" -path = "tests/open_files.rs" harness = false [[test]] name = "application_session_restore" -path = "tests/application_session_restore.rs" harness = false [[test]] name = "accessibility" -path = "tests/accessibility/main.rs" harness = false [features] @@ -68,22 +54,22 @@ default = ["kerberos"] kerberos = ["tablepro-driver-mssql/kerberos"] [dependencies] -tablepro-core = { path = "../core" } -tablepro-driver-clickhouse = { path = "../drivers/clickhouse" } -tablepro-driver-mssql = { path = "../drivers/mssql" } -tablepro-driver-mysql = { path = "../drivers/mysql" } -tablepro-driver-postgres = { path = "../drivers/postgres" } -tablepro-driver-sqlite = { path = "../drivers/sqlite" } +tablepro-core.workspace = true +tablepro-driver-clickhouse.workspace = true +tablepro-driver-mssql.workspace = true +tablepro-driver-mysql.workspace = true +tablepro-driver-postgres.workspace = true +tablepro-driver-sqlite.workspace = true +tablepro-net.workspace = true +tablepro-session.workspace = true +tablepro-ssh.workspace = true +tablepro-storage.workspace = true async-trait.workspace = true chrono.workspace = true futures.workspace = true serde.workspace = true serde_json.workspace = true thiserror.workspace = true -tablepro-net = { path = "../net" } -tablepro-ssh = { path = "../ssh" } -tablepro-session = { path = "../session" } -tablepro-storage = { path = "../storage" } gio.workspace = true gio-unix.workspace = true gtk4.workspace = true @@ -92,7 +78,7 @@ sourceview5.workspace = true glib.workspace = true relm4.workspace = true # CLOCK_BOOTTIME, which std does not expose, tells a suspend apart. -rustix = { version = "1.1", default-features = false, features = ["std", "time"] } +rustix = { workspace = true, features = ["time"] } secrecy.workspace = true tokio.workspace = true tokio-util = { workspace = true, features = ["rt"] } @@ -107,9 +93,9 @@ sqlformat = "0.5" [dev-dependencies] proptest.workspace = true -tablepro-session = { path = "../session", features = ["fakes"] } -tablepro-test-fixtures = { path = "../test-fixtures" } -tablepro-test-support = { path = "../test-support" } +tablepro-session = { workspace = true, features = ["fakes"] } +tablepro-test-fixtures.workspace = true +tablepro-test-support.workspace = true tempfile.workspace = true tokio = { workspace = true, features = ["macros", "rt", "test-util"] } # tokio-postgres logs through `log`, so the logging tests drive that diff --git a/linux/crates/app/src/application/debug_info.rs b/linux/crates/app/src/application/debug_info.rs index a54a5c9b70..3bdfb2e5a7 100644 --- a/linux/crates/app/src/application/debug_info.rs +++ b/linux/crates/app/src/application/debug_info.rs @@ -57,8 +57,8 @@ mod tests { flatpak: true, }; let mut drivers = DriverRegistry::new(); - drivers.register(Arc::new(drivers_sqlite::SqliteDriver)); - drivers.register(Arc::new(drivers_postgres::PgDriver)); + drivers.register(Arc::new(tablepro_driver_sqlite::SqliteDriver)); + drivers.register(Arc::new(tablepro_driver_postgres::PgDriver)); let expected = format!( "TablePro {version}\n\ diff --git a/linux/crates/app/src/lib.rs b/linux/crates/app/src/lib.rs index bd13811331..539c047974 100644 --- a/linux/crates/app/src/lib.rs +++ b/linux/crates/app/src/lib.rs @@ -68,11 +68,11 @@ pub fn run() -> Result { fn build_registry() -> DriverRegistry { let mut r = DriverRegistry::new(); - r.register(Arc::new(drivers_clickhouse::ClickhouseDriver)); - r.register(Arc::new(drivers_mssql::MssqlDriver)); - r.register(Arc::new(drivers_mysql::MysqlDriver)); - r.register(Arc::new(drivers_postgres::PgDriver)); - r.register(Arc::new(drivers_sqlite::SqliteDriver)); + r.register(Arc::new(tablepro_driver_clickhouse::ClickhouseDriver)); + r.register(Arc::new(tablepro_driver_mssql::MssqlDriver)); + r.register(Arc::new(tablepro_driver_mysql::MysqlDriver)); + r.register(Arc::new(tablepro_driver_postgres::PgDriver)); + r.register(Arc::new(tablepro_driver_sqlite::SqliteDriver)); r } diff --git a/linux/crates/app/src/logging.rs b/linux/crates/app/src/logging.rs index 43bbcf2a47..211130760a 100644 --- a/linux/crates/app/src/logging.rs +++ b/linux/crates/app/src/logging.rs @@ -205,7 +205,7 @@ mod tests { log::info!(target: "tokio_postgres::connection", "NOTICE: {SECRET}"); log::debug!(target: "sqlparser::parser", "Parsing sql '{SECRET}'..."); log::debug!(target: "sqlparser::dialect", "get_next_precedence_full() {SECRET}"); - log::debug!(target: "drivers_postgres::pool", "a pooled connection ended"); + log::debug!(target: "tablepro_driver_postgres::pool", "a pooled connection ended"); }); assert!(!text.contains("hunter2"), "{text}"); diff --git a/linux/crates/app/src/services/change_tracker.rs b/linux/crates/app/src/services/change_tracker.rs index 0bb2a1f109..5d47ac3cd9 100644 --- a/linux/crates/app/src/services/change_tracker.rs +++ b/linux/crates/app/src/services/change_tracker.rs @@ -1226,8 +1226,8 @@ mod tests { assert!(!t.can_undo()); } - fn postgres() -> drivers_postgres::PgDialect { - drivers_postgres::PgDialect::new(&tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)) + fn postgres() -> tablepro_driver_postgres::PgDialect { + tablepro_driver_postgres::PgDialect::new(&tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)) } fn plan(tracker: &TabChangeTracker, columns: &[ColumnInfo]) -> (TrackedChanges, tablepro_core::save::SavePlan) { diff --git a/linux/crates/app/src/services/pending_structure.rs b/linux/crates/app/src/services/pending_structure.rs index bdc8be2d9c..1cb9e74db0 100644 --- a/linux/crates/app/src/services/pending_structure.rs +++ b/linux/crates/app/src/services/pending_structure.rs @@ -136,9 +136,9 @@ mod tests { #[test] fn pending_structure_plans_with_supplied_dialect() { let pending = created(); - let postgres = drivers_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); - let mysql = drivers_mysql::MySqlDialect::new( - drivers_mysql::MySqlFlavour::MySql, + let postgres = tablepro_driver_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); + let mysql = tablepro_driver_mysql::MySqlDialect::new( + tablepro_driver_mysql::MySqlFlavour::MySql, &ServerInfo::new("MySQL", "8.4.3", 8, 4, 3), ); @@ -160,7 +160,7 @@ mod tests { } fn orders() -> TableDefinition { - let dialect = drivers_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); + let dialect = tablepro_driver_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); let column = |name: &str, primary_key: bool| { ColumnDefinition::new( ColumnInfo { @@ -201,7 +201,7 @@ mod tests { #[test] fn a_save_waits_for_a_valid_draft_and_every_typed_default() { - let postgres = drivers_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); + let postgres = tablepro_driver_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); let mut typed_default = edited(|draft| draft.columns[1].nullable = false); typed_default.unparsed_defaults = vec!["total".to_owned()]; let unnamed = edited(|draft| draft.columns[1].name = String::new()); @@ -292,15 +292,15 @@ mod tests { vec![ engine( "PostgreSQL", - Box::new(drivers_postgres::PgDialect::new(&server("PostgreSQL", 18))), + Box::new(tablepro_driver_postgres::PgDialect::new(&server("PostgreSQL", 18))), "integer", "text", Some("t_pkey"), ), engine( "MySQL", - Box::new(drivers_mysql::MySqlDialect::new( - drivers_mysql::MySqlFlavour::MySql, + Box::new(tablepro_driver_mysql::MySqlDialect::new( + tablepro_driver_mysql::MySqlFlavour::MySql, &ServerInfo::new("MySQL", "8.4.3", 8, 4, 3), )), "int", @@ -309,8 +309,8 @@ mod tests { ), engine( "MariaDB", - Box::new(drivers_mysql::MySqlDialect::new( - drivers_mysql::MySqlFlavour::MariaDb, + Box::new(tablepro_driver_mysql::MySqlDialect::new( + tablepro_driver_mysql::MySqlFlavour::MariaDb, &ServerInfo::new("MariaDB", "11.4.5", 11, 4, 5), )), "int", @@ -319,23 +319,26 @@ mod tests { ), engine( "SQL Server", - Box::new(drivers_mssql::MssqlDialect::new(16)), + Box::new(tablepro_driver_mssql::MssqlDialect::new(16)), "int", "nvarchar(40)", Some("PK_t"), ), engine( "SQLite", - Box::new(drivers_sqlite::SqliteDialect::new(drivers_sqlite::SqliteVersion::new( - 3, 46, 0, - ))), + Box::new(tablepro_driver_sqlite::SqliteDialect::new( + tablepro_driver_sqlite::SqliteVersion::new(3, 46, 0), + )), "INTEGER", "TEXT", None, ), engine( "ClickHouse", - Box::new(drivers_clickhouse::ClickHouseDialect::new(&server("ClickHouse", 25))), + Box::new(tablepro_driver_clickhouse::ClickHouseDialect::new(&server( + "ClickHouse", + 25, + ))), "Int32", "String", None, diff --git a/linux/crates/app/src/test_support.rs b/linux/crates/app/src/test_support/mod.rs similarity index 98% rename from linux/crates/app/src/test_support.rs rename to linux/crates/app/src/test_support/mod.rs index 22536db370..c780e8ac2d 100644 --- a/linux/crates/app/src/test_support.rs +++ b/linux/crates/app/src/test_support/mod.rs @@ -11,7 +11,7 @@ mod key_injector; mod main_loop; mod memory_settings; mod owned_window; -#[path = "../tests/support/settings_schema.rs"] +#[path = "../../tests/support/settings_schema.rs"] pub(crate) mod settings_schema; pub(crate) mod shortcut_keys; mod signal_log; diff --git a/linux/crates/app/src/ui/browse_tab/clipboard_handlers.rs b/linux/crates/app/src/ui/browse_tab/clipboard_handlers.rs index 0c8ef41197..cbd22f6ede 100644 --- a/linux/crates/app/src/ui/browse_tab/clipboard_handlers.rs +++ b/linux/crates/app/src/ui/browse_tab/clipboard_handlers.rs @@ -34,8 +34,8 @@ impl BrowseModel { /// The table a browse tab's rows came from, so an export can /// write them back as `INSERT` statements. - fn sql_target(&self) -> crate::ui::export_dialog::SqlTarget { - crate::ui::export_dialog::SqlTarget { + fn sql_target(&self) -> crate::ui::export::dialog::SqlTarget { + crate::ui::export::dialog::SqlTarget { table: self.table_ref(), generated: self .current_columns diff --git a/linux/crates/app/src/ui/browse_tab/tests.rs b/linux/crates/app/src/ui/browse_tab/tests.rs index 57c426fb03..a6d34703f4 100644 --- a/linux/crates/app/src/ui/browse_tab/tests.rs +++ b/linux/crates/app/src/ui/browse_tab/tests.rs @@ -952,8 +952,8 @@ fn f004_copy_row_as_insert_uses_row_below_draft() { #[gtk4::test] fn copy_as_in_clause_writes_the_servers_literals() { let mut script = serving_table(); - script.dialect = Arc::new(drivers_mysql::MySqlDialect::new( - drivers_mysql::MySqlFlavour::MySql, + script.dialect = Arc::new(tablepro_driver_mysql::MySqlDialect::new( + tablepro_driver_mysql::MySqlFlavour::MySql, &tablepro_core::ServerInfo::new("MySQL", "8.4.3", 8, 4, 3), )); let injected = "\\') OR 1=1 -- "; @@ -1015,7 +1015,7 @@ pub(super) fn rows_from(first: i64, names: &[&str]) -> QueryResult { fn partitioned_table() -> ConnectionScript { let server = tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0); let mut script = ConnectionScript { - dialect: Arc::new(drivers_postgres::PgDialect::new(&server)), + dialect: Arc::new(tablepro_driver_postgres::PgDialect::new(&server)), ..ConnectionScript::default() }; script diff --git a/linux/crates/app/src/ui/clipboard/tests.rs b/linux/crates/app/src/ui/clipboard/tests.rs index 0e6110ddcc..8b35c26b92 100644 --- a/linux/crates/app/src/ui/clipboard/tests.rs +++ b/linux/crates/app/src/ui/clipboard/tests.rs @@ -155,8 +155,8 @@ fn copy_insert_uses_visible_columns_only() { /// in one would close the string and run the rest as SQL. #[test] fn an_in_clause_copy_is_written_in_the_engines_literals() { - let dialect = Arc::new(drivers_mysql::MySqlDialect::new( - drivers_mysql::MySqlFlavour::MySql, + let dialect = Arc::new(tablepro_driver_mysql::MySqlDialect::new( + tablepro_driver_mysql::MySqlFlavour::MySql, &tablepro_core::ServerInfo::new("MySQL", "8.4.3", 8, 4, 3), )); let injected = "\\') OR 1=1 -- "; diff --git a/linux/crates/app/src/ui/connect_dialog/connect_form.rs b/linux/crates/app/src/ui/connect_dialog/connect_form.rs index 5907a91ef5..fbb1388989 100644 --- a/linux/crates/app/src/ui/connect_dialog/connect_form.rs +++ b/linux/crates/app/src/ui/connect_dialog/connect_form.rs @@ -620,19 +620,19 @@ mod tests { } fn postgres() -> &'static DriverCapabilities { - caps(&drivers_postgres::PgDriver) + caps(&tablepro_driver_postgres::PgDriver) } fn mysql() -> &'static DriverCapabilities { - caps(&drivers_mysql::MysqlDriver) + caps(&tablepro_driver_mysql::MysqlDriver) } fn mssql() -> &'static DriverCapabilities { - caps(&drivers_mssql::MssqlDriver) + caps(&tablepro_driver_mssql::MssqlDriver) } fn sqlite() -> &'static DriverCapabilities { - caps(&drivers_sqlite::SqliteDriver) + caps(&tablepro_driver_sqlite::SqliteDriver) } fn filled(driver_id: &str, caps: &DriverCapabilities) -> ConnectForm { diff --git a/linux/crates/app/src/ui/connect_dialog/tests.rs b/linux/crates/app/src/ui/connect_dialog/tests.rs index 38d430656d..e44a0fc9b1 100644 --- a/linux/crates/app/src/ui/connect_dialog/tests.rs +++ b/linux/crates/app/src/ui/connect_dialog/tests.rs @@ -47,11 +47,11 @@ impl Default for Options { fn registry() -> Arc { let mut registry = DriverRegistry::new(); - registry.register(Arc::new(drivers_clickhouse::ClickhouseDriver)); - registry.register(Arc::new(drivers_mssql::MssqlDriver)); - registry.register(Arc::new(drivers_mysql::MysqlDriver)); - registry.register(Arc::new(drivers_postgres::PgDriver)); - registry.register(Arc::new(drivers_sqlite::SqliteDriver)); + registry.register(Arc::new(tablepro_driver_clickhouse::ClickhouseDriver)); + registry.register(Arc::new(tablepro_driver_mssql::MssqlDriver)); + registry.register(Arc::new(tablepro_driver_mysql::MysqlDriver)); + registry.register(Arc::new(tablepro_driver_postgres::PgDriver)); + registry.register(Arc::new(tablepro_driver_sqlite::SqliteDriver)); Arc::new(registry) } diff --git a/linux/crates/app/src/ui/editor/tests.rs b/linux/crates/app/src/ui/editor/tests.rs index 3facdd28c5..3e9aa66539 100644 --- a/linux/crates/app/src/ui/editor/tests.rs +++ b/linux/crates/app/src/ui/editor/tests.rs @@ -496,7 +496,9 @@ fn a_run_is_judged_by_the_engine_it_ran_on() { assert!(harness.editor.is_running(), "the run did not start"); // SQLite has no logins, so its rules let CREATE USER into the history. let sqlite = ConnectionScript { - dialect: Arc::new(drivers_sqlite::SqliteDialect::new(drivers_sqlite::SQLITE_MIN_VERSION)), + dialect: Arc::new(tablepro_driver_sqlite::SqliteDialect::new( + tablepro_driver_sqlite::SQLITE_MIN_VERSION, + )), ..ConnectionScript::default() }; let moved_to = Arc::new(FakeEditorSession::new(answering())); diff --git a/linux/crates/app/src/ui/export_dialog.rs b/linux/crates/app/src/ui/export/dialog.rs similarity index 99% rename from linux/crates/app/src/ui/export_dialog.rs rename to linux/crates/app/src/ui/export/dialog.rs index cd6549cf59..9d00e78c19 100644 --- a/linux/crates/app/src/ui/export_dialog.rs +++ b/linux/crates/app/src/ui/export/dialog.rs @@ -12,7 +12,7 @@ use tablepro_core::meta::TableRef; use tablepro_session::Session; use uuid::Uuid; -use super::export::{ +use super::{ DocumentFormat, ExpectedRows, ExportFormat, ExportJob, ExportLedger, ExportOffer, ExportOrigin, ExportSource, InsertTarget, RowFormat, ScopeChoice, ScopeSource, scope_choices, }; @@ -281,7 +281,7 @@ fn combo_row(title: &str, choices: &[&str]) -> adw::ComboRow { .title(title) .model(>k::StringList::new(choices)) .build(); - super::combo_value::show_whole_value(&row); + crate::ui::combo_value::show_whole_value(&row); row } diff --git a/linux/crates/app/src/ui/export/export_ledger.rs b/linux/crates/app/src/ui/export/export_ledger/mod.rs similarity index 100% rename from linux/crates/app/src/ui/export/export_ledger.rs rename to linux/crates/app/src/ui/export/export_ledger/mod.rs diff --git a/linux/crates/app/src/ui/export/export_ledger/tests.rs b/linux/crates/app/src/ui/export/export_ledger/tests.rs index 27d3f3b13e..da884b4be7 100644 --- a/linux/crates/app/src/ui/export/export_ledger/tests.rs +++ b/linux/crates/app/src/ui/export/export_ledger/tests.rs @@ -262,7 +262,7 @@ fn entire_table_export_streams_every_row() { fn entire_table_export_has_no_identity_columns() { let harness = Harness::new(); let path = harness.path("users.csv"); - let dialect: Arc = Arc::new(drivers_postgres::PgDialect::new(&ServerInfo::new( + let dialect: Arc = Arc::new(tablepro_driver_postgres::PgDialect::new(&ServerInfo::new( "PostgreSQL", "16.4", 16, diff --git a/linux/crates/app/src/ui/export/export_scope.rs b/linux/crates/app/src/ui/export/export_scope.rs index a9e5399f6c..572326b7fc 100644 --- a/linux/crates/app/src/ui/export/export_scope.rs +++ b/linux/crates/app/src/ui/export/export_scope.rs @@ -2,10 +2,10 @@ use std::sync::Arc; use tablepro_session::Session; +use super::dialog::SqlTarget; use super::{ExpectedRows, ExportQuery, ExportSource}; use crate::i18n::{gettext, ngettext_f, pgettext}; use crate::ui::browse_tab::RowTotal; -use crate::ui::export_dialog::SqlTarget; use crate::ui::format::{format_thousands, plural_count}; /// What a tab asks the window to export. diff --git a/linux/crates/app/src/ui/export/mod.rs b/linux/crates/app/src/ui/export/mod.rs index e21c0dd4b5..b9f246bfb7 100644 --- a/linux/crates/app/src/ui/export/mod.rs +++ b/linux/crates/app/src/ui/export/mod.rs @@ -5,6 +5,7 @@ //! allows. The workspace's ledger tracks the running ones for the //! header bar, for logout and for the close prompts. +pub(super) mod dialog; mod document_sink; mod encoding_sink; mod export_failure_text; diff --git a/linux/crates/app/src/ui/export/replace_file_writer.rs b/linux/crates/app/src/ui/export/replace_file_writer/mod.rs similarity index 100% rename from linux/crates/app/src/ui/export/replace_file_writer.rs rename to linux/crates/app/src/ui/export/replace_file_writer/mod.rs diff --git a/linux/crates/app/src/ui/grid/row_key_builder.rs b/linux/crates/app/src/ui/grid/row_key_builder.rs index bc67f336fd..6613f22c14 100644 --- a/linux/crates/app/src/ui/grid/row_key_builder.rs +++ b/linux/crates/app/src/ui/grid/row_key_builder.rs @@ -103,7 +103,8 @@ mod tests { /// The layout the page builder gives `identity` over `columns`. fn layout(identity: &RowIdentity, columns: &[ColumnInfo]) -> PageLayout { - let dialect = drivers_postgres::PgDialect::new(&tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); + let dialect = + tablepro_driver_postgres::PgDialect::new(&tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); build_page( &dialect, &PageRequest { diff --git a/linux/crates/app/src/ui/mod.rs b/linux/crates/app/src/ui/mod.rs index 04bc35e8e8..6100b54ab5 100644 --- a/linux/crates/app/src/ui/mod.rs +++ b/linux/crates/app/src/ui/mod.rs @@ -11,7 +11,6 @@ mod editor; mod editor_font_provider; pub(crate) mod error_text; mod export; -mod export_dialog; mod file_read; pub(crate) mod file_reveal; mod file_write; diff --git a/linux/crates/app/src/ui/saved_queries_dialog.rs b/linux/crates/app/src/ui/saved_queries_dialog.rs index 9c72cd81c0..77f055c7b6 100644 --- a/linux/crates/app/src/ui/saved_queries_dialog.rs +++ b/linux/crates/app/src/ui/saved_queries_dialog.rs @@ -725,7 +725,7 @@ mod dialog_tests { .build() .expect("runtime") .block_on(async { - let connection = drivers_sqlite::SqliteDriver + let connection = tablepro_driver_sqlite::SqliteDriver .connect(options, CancellationToken::new()) .await .expect("connect"); diff --git a/linux/crates/app/src/ui/session_window/tests.rs b/linux/crates/app/src/ui/session_window/tests.rs index 7aa6f62721..08ce38457e 100644 --- a/linux/crates/app/src/ui/session_window/tests.rs +++ b/linux/crates/app/src/ui/session_window/tests.rs @@ -977,13 +977,9 @@ fn a_file_window_that_could_not_show_the_owner_stays_open_from_then_on() { #[gtk4::test] fn f002_late_show_create_reply_after_disconnect_is_dropped() { let test = TestWindow::connected_with("LateShowCreate", |script| { - script.dialect = Arc::new(drivers_postgres::PgDialect::new(&tablepro_core::ServerInfo::new( - "PostgreSQL", - "18.0", - 18, - 0, - 0, - ))); + script.dialect = Arc::new(tablepro_driver_postgres::PgDialect::new( + &tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0), + )); script.fetch_table_definition.always(FakeReply::Late { after: Duration::from_millis(300), outcome: Ok(users_table()), diff --git a/linux/crates/app/src/ui/structure_tab/foreign_key_dialog.rs b/linux/crates/app/src/ui/structure_tab/foreign_key_dialog.rs index a6cba60df3..e1ca41850c 100644 --- a/linux/crates/app/src/ui/structure_tab/foreign_key_dialog.rs +++ b/linux/crates/app/src/ui/structure_tab/foreign_key_dialog.rs @@ -753,9 +753,9 @@ mod tests { fn a_sqlite_key_picks_its_table_from_its_own_schema() { use tablepro_core::dialect::SqlDialect; - let sqlite = drivers_sqlite::SqliteDialect::new(drivers_sqlite::SqliteVersion::new(3, 45, 0)); + let sqlite = tablepro_driver_sqlite::SqliteDialect::new(tablepro_driver_sqlite::SqliteVersion::new(3, 45, 0)); let postgres = - drivers_postgres::PgDialect::new(&tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); + tablepro_driver_postgres::PgDialect::new(&tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); let sqlite = sqlite.ddl().expect("SQLite plans DDL"); let postgres = postgres.ddl().expect("PostgreSQL plans DDL"); diff --git a/linux/crates/app/src/ui/structure_tab/referential_action_label.rs b/linux/crates/app/src/ui/structure_tab/referential_action_label.rs index c4ee5494c9..243c73943b 100644 --- a/linux/crates/app/src/ui/structure_tab/referential_action_label.rs +++ b/linux/crates/app/src/ui/structure_tab/referential_action_label.rs @@ -36,7 +36,7 @@ mod tests { #[test] fn each_choice_decodes_to_the_action_it_is_labelled_with() { - let mssql = drivers_mssql::MssqlDialect::new(16); + let mssql = tablepro_driver_mssql::MssqlDialect::new(16); let actions = mssql.referential_actions(); let labels = action_labels(actions); diff --git a/linux/crates/app/src/ui/structure_tab/save_gate.rs b/linux/crates/app/src/ui/structure_tab/save_gate.rs index f6ff7485af..6fbefaaa64 100644 --- a/linux/crates/app/src/ui/structure_tab/save_gate.rs +++ b/linux/crates/app/src/ui/structure_tab/save_gate.rs @@ -36,7 +36,7 @@ mod tests { use super::*; fn users() -> TableDefinition { - let postgres = drivers_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); + let postgres = tablepro_driver_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); let id = ColumnInfo { name: "id".to_owned(), column_type: postgres.parse_type("integer").expect("a PostgreSQL type"), diff --git a/linux/crates/app/src/ui/structure_tab/sql_preview.rs b/linux/crates/app/src/ui/structure_tab/sql_preview.rs index ae47448b1b..4840db652b 100644 --- a/linux/crates/app/src/ui/structure_tab/sql_preview.rs +++ b/linux/crates/app/src/ui/structure_tab/sql_preview.rs @@ -42,7 +42,7 @@ mod tests { use crate::ui::structure_tab::{ColumnsInput, StructureMode, StructureModel, StructureTab, StructureTabInit}; fn postgres() -> Arc { - Arc::new(drivers_postgres::PgDialect::new(&ServerInfo::new( + Arc::new(tablepro_driver_postgres::PgDialect::new(&ServerInfo::new( "PostgreSQL", "18.0", 18, diff --git a/linux/crates/app/src/ui/structure_tab/tests.rs b/linux/crates/app/src/ui/structure_tab/tests.rs index cfef2dd4db..40ef444ee8 100644 --- a/linux/crates/app/src/ui/structure_tab/tests.rs +++ b/linux/crates/app/src/ui/structure_tab/tests.rs @@ -126,7 +126,7 @@ fn column_object(tab: &StructureTab, position: u32) -> DraftColumnObject { } fn postgres() -> Arc { - Arc::new(drivers_postgres::PgDialect::new(&ServerInfo::new( + Arc::new(tablepro_driver_postgres::PgDialect::new(&ServerInfo::new( "PostgreSQL", "18.0", 18, @@ -598,13 +598,9 @@ fn integer_column(name: &str, primary_key: bool) -> ColumnDefinition { #[gtk4::test] fn clickhouse_key_column_rename_is_insensitive_with_reason() { - let clickhouse: Arc = Arc::new(drivers_clickhouse::ClickHouseDialect::new(&ServerInfo::new( - "ClickHouse", - "25.8", - 25, - 8, - 0, - ))); + let clickhouse: Arc = Arc::new(tablepro_driver_clickhouse::ClickHouseDialect::new( + &ServerInfo::new("ClickHouse", "25.8", 25, 8, 0), + )); let mut key = definition("id"); key.columns[0].info.column_type = clickhouse.parse_type("UInt64").expect("a ClickHouse type"); key.columns[0].attributes.key_roles = ColumnKeyRoles { @@ -678,8 +674,8 @@ fn referenced_primary_key_switch_is_insensitive_with_foreign_key_names() { #[gtk4::test] fn a_computed_column_takes_no_comment_where_the_comment_restates_it() { - let mysql: Arc = Arc::new(drivers_mysql::MySqlDialect::new( - drivers_mysql::MySqlFlavour::MySql, + let mysql: Arc = Arc::new(tablepro_driver_mysql::MySqlDialect::new( + tablepro_driver_mysql::MySqlFlavour::MySql, &ServerInfo::new("MySQL", "8.4.3", 8, 4, 3), )); let mut table = definition("total"); @@ -1031,8 +1027,8 @@ fn a_postgres_identity_keeps_numbering_outside_the_key() { #[gtk4::test] fn a_mysql_column_stops_numbering_as_it_leaves_the_key() { - let mysql: Arc = Arc::new(drivers_mysql::MySqlDialect::new( - drivers_mysql::MySqlFlavour::MySql, + let mysql: Arc = Arc::new(tablepro_driver_mysql::MySqlDialect::new( + tablepro_driver_mysql::MySqlFlavour::MySql, &ServerInfo::new("MySQL", "8.4.3", 8, 4, 3), )); let mut table = keyed_users(); @@ -1106,9 +1102,9 @@ fn add_buttons(container: >k::Box) -> Vec { /// A SQLite `users (body)` table stored as `create_statement`. fn sqlite_users(create_statement: &str) -> Vec { - let sqlite: Arc = Arc::new(drivers_sqlite::SqliteDialect::new(drivers_sqlite::SqliteVersion::new( - 3, 45, 0, - ))); + let sqlite: Arc = Arc::new(tablepro_driver_sqlite::SqliteDialect::new( + tablepro_driver_sqlite::SqliteVersion::new(3, 45, 0), + )); let mut table = definition("body"); table.source = Some(TableSource { create_statement: create_statement.to_owned(), diff --git a/linux/crates/app/src/ui/workspace/mod.rs b/linux/crates/app/src/ui/workspace/mod.rs index 668106b38e..9d7e546c5b 100644 --- a/linux/crates/app/src/ui/workspace/mod.rs +++ b/linux/crates/app/src/ui/workspace/mod.rs @@ -3,8 +3,6 @@ //! disconnect drops it and the window shows the connection picker. mod close_flow; -#[cfg(test)] -mod close_tab_tests; mod editor_label; mod finished_work; mod health_banner; @@ -24,9 +22,9 @@ mod tab_identity; mod tab_index; mod tab_spec; mod tab_title; -#[cfg(test)] -mod tab_title_tests; mod table_naming; +#[cfg(test)] +mod tests; mod unsaved_icon; mod window_tabs; mod window_title; @@ -1039,7 +1037,7 @@ impl WorkspaceModel { WorkspaceInput::ExportResults { tab, offer } => { if let Some(window) = self.window() { let dialect = self.context.active.get().and_then(|session| session.current_dialect()); - super::export_dialog::present(super::export_dialog::ExportDialogInit { + super::export::dialog::present(super::export::dialog::ExportDialogInit { parent: &window, exports: &self.exports, offer: *offer, diff --git a/linux/crates/app/src/ui/workspace/sidebar/sidebar_affordances.rs b/linux/crates/app/src/ui/workspace/sidebar/sidebar_affordances.rs index 58908200b8..bf22b4a11a 100644 --- a/linux/crates/app/src/ui/workspace/sidebar/sidebar_affordances.rs +++ b/linux/crates/app/src/ui/workspace/sidebar/sidebar_affordances.rs @@ -42,8 +42,9 @@ mod tests { #[test] fn affordances_from_ddl_capabilities() { - let postgres = drivers_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); - let clickhouse = drivers_clickhouse::ClickHouseDialect::new(&ServerInfo::new("ClickHouse", "25.8", 25, 8, 0)); + let postgres = tablepro_driver_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); + let clickhouse = + tablepro_driver_clickhouse::ClickHouseDialect::new(&ServerInfo::new("ClickHouse", "25.8", 25, 8, 0)); let none = SidebarAffordances::of(false, Some(&FakeDialect)); let creates = SidebarAffordances::of(false, Some(&postgres)); @@ -62,7 +63,7 @@ mod tests { #[test] fn affordances_hide_drop_when_read_only() { - let postgres = drivers_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); + let postgres = tablepro_driver_postgres::PgDialect::new(&ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)); let read_only = SidebarAffordances::of(true, Some(&postgres)); diff --git a/linux/crates/app/src/ui/workspace/structure.rs b/linux/crates/app/src/ui/workspace/structure.rs index 3d34032771..e785b47ef3 100644 --- a/linux/crates/app/src/ui/workspace/structure.rs +++ b/linux/crates/app/src/ui/workspace/structure.rs @@ -500,8 +500,8 @@ mod tests { } } - fn postgres_dialect() -> drivers_postgres::PgDialect { - drivers_postgres::PgDialect::new(&tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)) + fn postgres_dialect() -> tablepro_driver_postgres::PgDialect { + tablepro_driver_postgres::PgDialect::new(&tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0)) } #[test] @@ -518,8 +518,8 @@ mod tests { #[test] fn create_table_sql_is_the_servers_own_text_where_it_keeps_one() { - let dialect = drivers_mysql::MySqlDialect::new( - drivers_mysql::MySqlFlavour::MySql, + let dialect = tablepro_driver_mysql::MySqlDialect::new( + tablepro_driver_mysql::MySqlFlavour::MySql, &tablepro_core::ServerInfo::new("MySQL", "8.4.3", 8, 4, 3), ); let mut table = definition(vec![text_column("id")]); diff --git a/linux/crates/app/src/ui/workspace/close_tab_tests.rs b/linux/crates/app/src/ui/workspace/tests/close_tab.rs similarity index 98% rename from linux/crates/app/src/ui/workspace/close_tab_tests.rs rename to linux/crates/app/src/ui/workspace/tests/close_tab.rs index d56c39fab1..82e8320a19 100644 --- a/linux/crates/app/src/ui/workspace/close_tab_tests.rs +++ b/linux/crates/app/src/ui/workspace/tests/close_tab.rs @@ -9,7 +9,7 @@ use tablepro_core::{ColumnInfo, QueryResult, Value}; use tablepro_test_support::{ConnectionScript, FakeReply}; use uuid::Uuid; -use super::{OpenMode, WorkspaceInput}; +use super::super::{OpenMode, WorkspaceInput}; use crate::runtime::DeliverInput; use crate::test_support::{after_next_frame, descendants, drain_main_context, wait_until}; use crate::ui::browse_tab::BrowseTab; @@ -179,7 +179,7 @@ fn a_tab_closed_with_the_focus_in_it_is_freed_when_the_next_takes_none() { fn editor_on_file(test: &TestWindow, path: &std::path::Path) -> (Uuid, crate::ui::editor::SqlEditor) { let workspace = test.workspace(); workspace.with_model(|model| { - model.open_tab(super::tab_spec::TabSpec::Editor { + model.open_tab(super::super::tab_spec::TabSpec::Editor { initial_query: Some("SELECT 2;".to_owned()), draft: None, file: Some(crate::workspace::EditorFileRecord { diff --git a/linux/crates/app/src/ui/workspace/tests/mod.rs b/linux/crates/app/src/ui/workspace/tests/mod.rs new file mode 100644 index 0000000000..b8d730306f --- /dev/null +++ b/linux/crates/app/src/ui/workspace/tests/mod.rs @@ -0,0 +1,2 @@ +mod close_tab; +mod tab_title; diff --git a/linux/crates/app/src/ui/workspace/tab_title_tests.rs b/linux/crates/app/src/ui/workspace/tests/tab_title.rs similarity index 97% rename from linux/crates/app/src/ui/workspace/tab_title_tests.rs rename to linux/crates/app/src/ui/workspace/tests/tab_title.rs index b94113c9b4..07cc91af88 100644 --- a/linux/crates/app/src/ui/workspace/tab_title_tests.rs +++ b/linux/crates/app/src/ui/workspace/tests/tab_title.rs @@ -10,9 +10,9 @@ use tablepro_storage::DraftId; use tablepro_test_support::{FakeEditorSession, FakeReply, FakeRun, Replies}; use uuid::Uuid; -use super::structure_target::StructureTarget; -use super::tab_spec::TabSpec; -use super::{Workspace, WorkspaceInput, WorkspaceTab}; +use super::super::structure_target::StructureTarget; +use super::super::tab_spec::TabSpec; +use super::super::{Workspace, WorkspaceInput, WorkspaceTab}; use crate::runtime::DeliverInput; use crate::services::pending_structure::PendingStructure; use crate::test_support::{finish_on_main, wait_until}; @@ -243,7 +243,7 @@ fn tabs_name_the_schema_once_the_session_has_two() { .with_model(|model| { model.open_tab(TabSpec::Table { table: TableRef::new(Some("public".to_owned()), "orders"), - page: super::tab_spec::TablePage::first(100), + page: super::super::tab_spec::TablePage::first(100), }) }) .flatten() diff --git a/linux/crates/app/src/workspace/engine_profile.rs b/linux/crates/app/src/workspace/engine_profile.rs index 70581c4f55..a6c2feb78c 100644 --- a/linux/crates/app/src/workspace/engine_profile.rs +++ b/linux/crates/app/src/workspace/engine_profile.rs @@ -36,7 +36,7 @@ mod tests { #[test] fn an_engine_comes_from_its_driver_and_an_unknown_one_asks() { let mut drivers = DriverRegistry::new(); - drivers.register(Arc::new(drivers_mysql::MysqlDriver)); + drivers.register(Arc::new(tablepro_driver_mysql::MysqlDriver)); assert_eq!( EngineProfile::of(&drivers, "mysql"), diff --git a/linux/crates/app/src/workspace/mod.rs b/linux/crates/app/src/workspace/mod.rs index 07134a3a5e..81ec6cccd4 100644 --- a/linux/crates/app/src/workspace/mod.rs +++ b/linux/crates/app/src/workspace/mod.rs @@ -41,14 +41,14 @@ mod save_ticket; mod schema_write; mod session_key_record; mod sort_record; -#[cfg(test)] -mod structure_review_tests; mod tab_directory; mod tab_entry; mod tab_record; mod tab_snapshot; #[cfg(test)] pub(crate) mod test_workspace; +#[cfg(test)] +mod tests; mod unknown_cause; mod unknown_outcome_dialog; mod waiting_dialog; diff --git a/linux/crates/app/src/workspace/test_workspace.rs b/linux/crates/app/src/workspace/test_workspace.rs index 60fe7f5e9d..33f3f15545 100644 --- a/linux/crates/app/src/workspace/test_workspace.rs +++ b/linux/crates/app/src/workspace/test_workspace.rs @@ -59,9 +59,9 @@ pub(crate) fn integer(name: &str, primary_key: bool) -> ColumnInfo { } pub(crate) fn sqlite() -> Arc { - Arc::new(drivers_sqlite::SqliteDialect::new(drivers_sqlite::SqliteVersion::new( - 3, 45, 0, - ))) + Arc::new(tablepro_driver_sqlite::SqliteDialect::new( + tablepro_driver_sqlite::SqliteVersion::new(3, 45, 0), + )) } /// `t (id INTEGER, n INTEGER)` as SQLite reads it, edited by `edit`. diff --git a/linux/crates/app/src/workspace/tests/mod.rs b/linux/crates/app/src/workspace/tests/mod.rs new file mode 100644 index 0000000000..4609a275bc --- /dev/null +++ b/linux/crates/app/src/workspace/tests/mod.rs @@ -0,0 +1 @@ +mod structure_review; diff --git a/linux/crates/app/src/workspace/structure_review_tests.rs b/linux/crates/app/src/workspace/tests/structure_review.rs similarity index 97% rename from linux/crates/app/src/workspace/structure_review_tests.rs rename to linux/crates/app/src/workspace/tests/structure_review.rs index fc9c3edfe1..e73c9aae02 100644 --- a/linux/crates/app/src/workspace/structure_review_tests.rs +++ b/linux/crates/app/src/workspace/tests/structure_review.rs @@ -11,9 +11,9 @@ use tablepro_core::WriteReport; use tablepro_core::ddl::{BuildDdlError, DraftColumn, DraftType, TableDraft}; use tablepro_test_support::{CallCounters, ConnectionScript, FakeReply}; -use super::dialog_response::{answer, visible_alert}; -use super::test_workspace::{WAIT, Workspace, edited_table, window}; -use super::{PendingState, SaveOutcome, SaveRejection, SaveStart}; +use super::super::dialog_response::{answer, visible_alert}; +use super::super::test_workspace::{WAIT, Workspace, edited_table, window}; +use super::super::{PendingState, SaveOutcome, SaveRejection, SaveStart}; use crate::services::pending_structure::PendingStructure; use crate::test_support::wait_until; diff --git a/linux/crates/app/tests/accessibility/main.rs b/linux/crates/app/tests/accessibility/main.rs index ced91f615e..d92b805e28 100644 --- a/linux/crates/app/tests/accessibility/main.rs +++ b/linux/crates/app/tests/accessibility/main.rs @@ -305,8 +305,8 @@ fn open_cell_editor(window: &adw::ApplicationWindow) -> Result<(), String> { fn connect_dialog() -> Result, String> { let mut drivers = DriverRegistry::new(); let engines: [Arc; 2] = [ - Arc::new(drivers_postgres::PgDriver), - Arc::new(drivers_sqlite::SqliteDriver), + Arc::new(tablepro_driver_postgres::PgDriver), + Arc::new(tablepro_driver_sqlite::SqliteDriver), ]; for engine in engines { drivers.register(engine); @@ -388,7 +388,7 @@ fn fake_driver() -> DriverRegistry { /// definition, in an engine whose structure can be edited. fn one_table() -> ConnectionScript { let mut script = ConnectionScript { - dialect: Arc::new(drivers_postgres::PgDialect::new(&ServerInfo::new( + dialect: Arc::new(tablepro_driver_postgres::PgDialect::new(&ServerInfo::new( "PostgreSQL", "18.0", 18, diff --git a/linux/crates/app/tests/tracker_save_postgres.rs b/linux/crates/app/tests/tracker_save_postgres.rs index 95a6bd270a..f4e01342f9 100644 --- a/linux/crates/app/tests/tracker_save_postgres.rs +++ b/linux/crates/app/tests/tracker_save_postgres.rs @@ -9,7 +9,6 @@ use std::sync::Arc; use std::time::Duration; -use drivers_postgres::PgDriver; use secrecy::SecretString; use tablepro_app::change_tracker::{RowKey, pk_identity}; use tablepro_app::tab_tracker_handle::TabTrackerHandle; @@ -23,6 +22,7 @@ use tablepro_core::{ ForeignKeyMode, NetworkEndpoint, NetworkTarget, RowLimit, TlsConfig, Value, WorkspaceSettings, WriteBatch, WriteKind, }; +use tablepro_driver_postgres::PgDriver; use tablepro_net::DirectTcpTransport; use tablepro_test_fixtures::{HbaMode, PostgresFixture}; use tablepro_test_support::conformance::test_liveness; diff --git a/linux/crates/core/Cargo.toml b/linux/crates/core/Cargo.toml index 5ff6acc20e..abdb754d84 100644 --- a/linux/crates/core/Cargo.toml +++ b/linux/crates/core/Cargo.toml @@ -3,11 +3,7 @@ name = "tablepro-core" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "tablepro_core" -path = "src/lib.rs" +publish.workspace = true [dependencies] async-trait.workspace = true diff --git a/linux/crates/drivers/clickhouse/Cargo.toml b/linux/crates/drivers/clickhouse/Cargo.toml index 0c60db0d63..b71c94009e 100644 --- a/linux/crates/drivers/clickhouse/Cargo.toml +++ b/linux/crates/drivers/clickhouse/Cargo.toml @@ -3,15 +3,11 @@ name = "tablepro-driver-clickhouse" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "drivers_clickhouse" -path = "src/lib.rs" +publish.workspace = true [dependencies] -tablepro-core = { path = "../../core" } -tablepro-net = { path = "../../net" } +tablepro-core.workspace = true +tablepro-net.workspace = true async-trait.workspace = true chrono.workspace = true # lz4 stays off: with it on, fetch_bytes asks for compressed responses, @@ -33,15 +29,10 @@ tracing.workspace = true uuid.workspace = true [dev-dependencies] -tablepro-test-fixtures = { path = "../../test-fixtures" } -tablepro-test-support = { path = "../../test-support" } -async-trait.workspace = true -chrono.workspace = true +tablepro-test-fixtures.workspace = true +tablepro-test-support.workspace = true rustls.workspace = true -secrecy.workspace = true tokio = { workspace = true, features = ["macros", "rt-multi-thread", "test-util"] } -tokio-util = { workspace = true, features = ["rt"] } -uuid.workspace = true [lints] workspace = true diff --git a/linux/crates/drivers/clickhouse/tests/integration/conformance_engine.rs b/linux/crates/drivers/clickhouse/tests/integration/conformance_engine.rs index 632dad6a07..2a2edc051c 100644 --- a/linux/crates/drivers/clickhouse/tests/integration/conformance_engine.rs +++ b/linux/crates/drivers/clickhouse/tests/integration/conformance_engine.rs @@ -4,13 +4,13 @@ use std::sync::Arc; use std::time::Duration; use async_trait::async_trait; -use drivers_clickhouse::ClickhouseDriver; use tablepro_core::ddl::DraftColumn; use tablepro_core::ddl::ddl_sql::default_sql; use tablepro_core::dialect::SqlDialect; use tablepro_core::{ ConnectOptions, DatabaseDriver, LivenessPolicy, NetworkEndpoint, TableRef, TlsConfig, WorkspaceSettings, }; +use tablepro_driver_clickhouse::ClickhouseDriver; use tablepro_test_fixtures::ClickHouseFixture; use tablepro_test_support::FaultTransport; use tablepro_test_support::conformance::{ diff --git a/linux/crates/drivers/clickhouse/tests/integration/support.rs b/linux/crates/drivers/clickhouse/tests/integration/support.rs index ac33d64396..877b070d54 100644 --- a/linux/crates/drivers/clickhouse/tests/integration/support.rs +++ b/linux/crates/drivers/clickhouse/tests/integration/support.rs @@ -5,7 +5,6 @@ use std::sync::{Arc, Mutex, PoisonError}; use std::time::Duration; use async_trait::async_trait; -use drivers_clickhouse::ClickhouseDriver; use secrecy::SecretString; use tablepro_core::save::{ChangeSet, plan_save}; use tablepro_core::statement::{GuardedStatement, Statement, StatementBuilder}; @@ -15,6 +14,7 @@ use tablepro_core::{ ResultEvent, ResultSink, RowLimit, RunEnd, RunOptions, RunSummary, SinkFlow, TableRef, TlsConfig, Transport, UserSql, Value, WorkspaceSettings, WriteBatch, WriteKind, WriteReport, }; +use tablepro_driver_clickhouse::ClickhouseDriver; use tablepro_net::DirectTcpTransport; use tablepro_test_fixtures::{ClickHouseFixture, FixtureCredentials}; use tablepro_test_support::conformance::test_liveness; diff --git a/linux/crates/drivers/clickhouse/tests/integration/tls.rs b/linux/crates/drivers/clickhouse/tests/integration/tls.rs index 7dabe21826..8519462a4f 100644 --- a/linux/crates/drivers/clickhouse/tests/integration/tls.rs +++ b/linux/crates/drivers/clickhouse/tests/integration/tls.rs @@ -5,12 +5,12 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use async_trait::async_trait; -use drivers_clickhouse::ClickhouseDriver; use secrecy::SecretString; use tablepro_core::{ ClientIdentity, ConnectOptions, Credentials, DatabaseDriver, DriverError, ErrorCategory, TlsConfig, TlsFailure, TlsMode, WorkspaceSettings, }; +use tablepro_driver_clickhouse::ClickhouseDriver; use tablepro_test_fixtures::{ClickHouseFixture, PkiFile, TestPki}; use tablepro_test_support::conformance::{ ClientIdentityEngine, ConformanceFailure, TlsConformanceEngine, test_liveness, diff --git a/linux/crates/drivers/mssql/Cargo.toml b/linux/crates/drivers/mssql/Cargo.toml index 96578eea29..b9498adeee 100644 --- a/linux/crates/drivers/mssql/Cargo.toml +++ b/linux/crates/drivers/mssql/Cargo.toml @@ -3,19 +3,15 @@ name = "tablepro-driver-mssql" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "drivers_mssql" -path = "src/lib.rs" +publish.workspace = true [features] default = [] kerberos = ["tiberius/integrated-auth-gssapi"] [dependencies] -tablepro-core = { path = "../../core" } -tablepro-net = { path = "../../net" } +tablepro-core.workspace = true +tablepro-net.workspace = true async-trait.workspace = true chrono.workspace = true deadpool.workspace = true @@ -28,14 +24,9 @@ tracing.workspace = true uuid.workspace = true [dev-dependencies] -tablepro-test-fixtures = { path = "../../test-fixtures" } -tablepro-test-support = { path = "../../test-support" } -async-trait.workspace = true -chrono.workspace = true -secrecy.workspace = true +tablepro-test-fixtures.workspace = true +tablepro-test-support.workspace = true tokio = { workspace = true, features = ["io-util", "macros", "rt-multi-thread", "test-util"] } -tokio-util = { workspace = true, features = ["rt"] } -uuid.workspace = true [lints] workspace = true diff --git a/linux/crates/drivers/mssql/tests/integration/conformance_engine.rs b/linux/crates/drivers/mssql/tests/integration/conformance_engine.rs index 83fc395f37..ce2510972c 100644 --- a/linux/crates/drivers/mssql/tests/integration/conformance_engine.rs +++ b/linux/crates/drivers/mssql/tests/integration/conformance_engine.rs @@ -8,8 +8,8 @@ use std::sync::Arc; use std::time::Duration; use async_trait::async_trait; -use drivers_mssql::{MssqlDriver, WORKSPACE_POOL_MAX_SIZE}; use tablepro_core::{ConnectOptions, DatabaseDriver, LivenessPolicy, NetworkEndpoint, TableRef, WorkspaceSettings}; +use tablepro_driver_mssql::{MssqlDriver, WORKSPACE_POOL_MAX_SIZE}; use tablepro_test_fixtures::MssqlFixture; use tablepro_test_support::FaultTransport; use tablepro_test_support::conformance::{ diff --git a/linux/crates/drivers/mssql/tests/integration/metadata.rs b/linux/crates/drivers/mssql/tests/integration/metadata.rs index 8dddfd177e..d80817776a 100644 --- a/linux/crates/drivers/mssql/tests/integration/metadata.rs +++ b/linux/crates/drivers/mssql/tests/integration/metadata.rs @@ -1,12 +1,12 @@ //! The catalogue as browse and the structure tab read it. -use drivers_mssql::MssqlDialect; use tablepro_core::column::{ColumnDefault, ColumnKind, ReadForm, TextLength}; use tablepro_core::ddl::{DdlDialect, IdentityStyle, TableDraft, diff_table}; use tablepro_core::dialect::{BindTarget, LikeForm}; use tablepro_core::meta::{ObjectKind, ObjectScope, RowIdentity, TableRef}; use tablepro_core::statement::StatementBuilder; use tablepro_core::{RowLimit, Value}; +use tablepro_driver_mssql::MssqlDialect; use crate::support::{CALL, columns, connect, dbo, rows, scalar, setup, start, statement, within}; diff --git a/linux/crates/drivers/mssql/tests/integration/support.rs b/linux/crates/drivers/mssql/tests/integration/support.rs index f14eb108df..60ce593aac 100644 --- a/linux/crates/drivers/mssql/tests/integration/support.rs +++ b/linux/crates/drivers/mssql/tests/integration/support.rs @@ -8,7 +8,6 @@ use std::sync::{Arc, Mutex, PoisonError}; use std::time::Duration; use async_trait::async_trait; -use drivers_mssql::MssqlDriver; use secrecy::SecretString; use tablepro_core::column::ColumnInfo; use tablepro_core::dialect::{BindTarget, SqlDialect}; @@ -19,6 +18,7 @@ use tablepro_core::{ ResultEvent, ResultSink, RowLimit, RunEnd, RunOptions, RunSummary, SinkFlow, TableRef, TlsConfig, TlsMode, Transport, UserSql, Value, WorkspaceSettings, WriteBatch, WriteKind, WriteReport, }; +use tablepro_driver_mssql::MssqlDriver; use tablepro_net::DirectTcpTransport; use tablepro_test_fixtures::{FixtureCredentials, MssqlFixture}; use tablepro_test_support::conformance::test_liveness; diff --git a/linux/crates/drivers/mssql/tests/integration/tls.rs b/linux/crates/drivers/mssql/tests/integration/tls.rs index 91f7b923ba..029174da3d 100644 --- a/linux/crates/drivers/mssql/tests/integration/tls.rs +++ b/linux/crates/drivers/mssql/tests/integration/tls.rs @@ -8,10 +8,10 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use async_trait::async_trait; -use drivers_mssql::MssqlDriver; use tablepro_core::{ ConnectOptions, DatabaseDriver, DriverError, ErrorCategory, TlsConfig, TlsFailure, TlsMode, WorkspaceSettings, }; +use tablepro_driver_mssql::MssqlDriver; use tablepro_test_fixtures::{MssqlFixture, PkiFile, TestPki}; use tablepro_test_support::conformance::{ConformanceFailure, TlsConformanceEngine, test_liveness}; diff --git a/linux/crates/drivers/mysql/Cargo.toml b/linux/crates/drivers/mysql/Cargo.toml index d7abf7c4a6..414c9ae1c3 100644 --- a/linux/crates/drivers/mysql/Cargo.toml +++ b/linux/crates/drivers/mysql/Cargo.toml @@ -3,15 +3,11 @@ name = "tablepro-driver-mysql" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "drivers_mysql" -path = "src/lib.rs" +publish.workspace = true [dependencies] -tablepro-core = { path = "../../core" } -tablepro-net = { path = "../../net" } +tablepro-core.workspace = true +tablepro-net.workspace = true async-trait.workspace = true chrono.workspace = true deadpool.workspace = true @@ -24,15 +20,10 @@ tokio-util = { workspace = true, features = ["rt"] } tracing.workspace = true [dev-dependencies] -tablepro-test-fixtures = { path = "../../test-fixtures" } -tablepro-test-support = { path = "../../test-support" } -async-trait.workspace = true -chrono.workspace = true -secrecy.workspace = true +tablepro-test-fixtures.workspace = true +tablepro-test-support.workspace = true tempfile.workspace = true tokio = { workspace = true, features = ["macros", "rt-multi-thread", "test-util"] } -tokio-util = { workspace = true, features = ["rt"] } -tracing.workspace = true tracing-subscriber.workspace = true [lints] diff --git a/linux/crates/drivers/mysql/src/catalog.rs b/linux/crates/drivers/mysql/src/catalog/mod.rs similarity index 100% rename from linux/crates/drivers/mysql/src/catalog.rs rename to linux/crates/drivers/mysql/src/catalog/mod.rs diff --git a/linux/crates/drivers/mysql/src/ddl.rs b/linux/crates/drivers/mysql/src/ddl/mod.rs similarity index 100% rename from linux/crates/drivers/mysql/src/ddl.rs rename to linux/crates/drivers/mysql/src/ddl/mod.rs diff --git a/linux/crates/drivers/mysql/tests/integration/conformance_engine.rs b/linux/crates/drivers/mysql/tests/integration/conformance_engine.rs index f61debfdbd..7af1cad1d9 100644 --- a/linux/crates/drivers/mysql/tests/integration/conformance_engine.rs +++ b/linux/crates/drivers/mysql/tests/integration/conformance_engine.rs @@ -5,10 +5,10 @@ use std::sync::Arc; use std::time::Duration; use async_trait::async_trait; -use drivers_mysql::{MysqlDriver, WORKSPACE_POOL_MAX_SIZE}; use tablepro_core::{ ConnectOptions, DatabaseDriver, LivenessPolicy, NetworkEndpoint, TableRef, TlsConfig, WorkspaceSettings, }; +use tablepro_driver_mysql::{MysqlDriver, WORKSPACE_POOL_MAX_SIZE}; use tablepro_test_fixtures::{MysqlFixture, MysqlFlavour, MysqlOptions}; use tablepro_test_support::FaultTransport; use tablepro_test_support::conformance::{ diff --git a/linux/crates/drivers/mysql/tests/integration/server_time_zone.rs b/linux/crates/drivers/mysql/tests/integration/server_time_zone.rs index c8dc873e40..b7957a6558 100644 --- a/linux/crates/drivers/mysql/tests/integration/server_time_zone.rs +++ b/linux/crates/drivers/mysql/tests/integration/server_time_zone.rs @@ -161,7 +161,7 @@ async fn writes_and_ddl_use_the_servers_zone() { instant(2025, 1, 1, 5, 0), "{flavour:?}: a TIMESTAMP reads as its instant" ); - for _ in 0..drivers_mysql::WORKSPACE_POOL_MAX_SIZE { + for _ in 0..tablepro_driver_mysql::WORKSPACE_POOL_MAX_SIZE { assert_eq!( text(&scalar(connection.as_ref(), "SELECT @@session.time_zone").await), "+00:00", diff --git a/linux/crates/drivers/mysql/tests/integration/support.rs b/linux/crates/drivers/mysql/tests/integration/support.rs index 83a11ad6f8..259844f7b3 100644 --- a/linux/crates/drivers/mysql/tests/integration/support.rs +++ b/linux/crates/drivers/mysql/tests/integration/support.rs @@ -6,7 +6,6 @@ use std::sync::{Arc, Mutex, PoisonError}; use std::time::Duration; use async_trait::async_trait; -use drivers_mysql::MysqlDriver; use secrecy::SecretString; use tablepro_core::statement::{GuardedStatement, Statement, StatementBuilder}; use tablepro_core::{ @@ -15,6 +14,7 @@ use tablepro_core::{ ResultEvent, ResultSink, RunEnd, RunOptions, RunSummary, SinkFlow, TableRef, TlsConfig, Transport, Truncation, UserSql, Value, WorkspaceSettings, WriteBatch, WriteKind, WriteReport, }; +use tablepro_driver_mysql::MysqlDriver; use tablepro_net::DirectTcpTransport; use tablepro_test_fixtures::{FixtureCredentials, MysqlFixture, MysqlFlavour, MysqlOptions}; use tablepro_test_support::conformance::test_liveness; diff --git a/linux/crates/drivers/mysql/tests/integration/tls.rs b/linux/crates/drivers/mysql/tests/integration/tls.rs index dee272b5dd..879ed3fee9 100644 --- a/linux/crates/drivers/mysql/tests/integration/tls.rs +++ b/linux/crates/drivers/mysql/tests/integration/tls.rs @@ -6,11 +6,11 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use async_trait::async_trait; -use drivers_mysql::MysqlDriver; use tablepro_core::{ ClientIdentity, ConnectOptions, DatabaseDriver, DriverError, ErrorCategory, NetworkEndpoint, TlsConfig, TlsFailure, TlsMode, Transport, TransportError, TransportKind, TransportRoute, TransportStream, WorkspaceSettings, }; +use tablepro_driver_mysql::MysqlDriver; use tablepro_test_fixtures::{MysqlFixture, MysqlFlavour, MysqlOptions, PkiFile, TestPki}; use tablepro_test_support::FaultTransport; use tablepro_test_support::conformance::{ diff --git a/linux/crates/drivers/mysql/tests/statement_logging.rs b/linux/crates/drivers/mysql/tests/statement_logging.rs index ccc2e47bf7..f2ba53b066 100644 --- a/linux/crates/drivers/mysql/tests/statement_logging.rs +++ b/linux/crates/drivers/mysql/tests/statement_logging.rs @@ -9,13 +9,13 @@ use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering}; use std::time::Duration; -use drivers_mysql::MysqlDriver; use secrecy::SecretString; use tablepro_core::statement::StatementBuilder; use tablepro_core::{ CallOptions, ConnectEnvironment, ConnectOptions, ConnectTarget, Credentials, DatabaseDriver, NetworkEndpoint, NetworkTarget, RowLimit, TlsConfig, UserSql, WorkspaceSettings, }; +use tablepro_driver_mysql::MysqlDriver; use tablepro_net::DirectTcpTransport; use tablepro_test_fixtures::{MysqlFixture, MysqlFlavour, MysqlOptions}; use tablepro_test_support::conformance::test_liveness; diff --git a/linux/crates/drivers/mysql/tests/system_trust.rs b/linux/crates/drivers/mysql/tests/system_trust.rs index 14aa71dcff..4e8f321936 100644 --- a/linux/crates/drivers/mysql/tests/system_trust.rs +++ b/linux/crates/drivers/mysql/tests/system_trust.rs @@ -16,13 +16,13 @@ use std::path::Path; use std::sync::Arc; use async_trait::async_trait; -use drivers_mysql::MysqlDriver; use secrecy::SecretString; use tablepro_core::{ ConnectEnvironment, ConnectOptions, ConnectTarget, Credentials, DatabaseDriver, DriverError, NetworkEndpoint, NetworkTarget, TlsConfig, TlsFailure, TlsMode, Transport, TransportError, TransportKind, TransportRoute, TransportStream, WorkspaceSettings, }; +use tablepro_driver_mysql::MysqlDriver; use tablepro_test_fixtures::{MysqlFixture, MysqlFlavour, PkiFile, TestPki}; use tablepro_test_support::FaultTransport; use tablepro_test_support::conformance::test_liveness; diff --git a/linux/crates/drivers/postgres/Cargo.toml b/linux/crates/drivers/postgres/Cargo.toml index 156d2fec3b..71ab903a65 100644 --- a/linux/crates/drivers/postgres/Cargo.toml +++ b/linux/crates/drivers/postgres/Cargo.toml @@ -3,15 +3,11 @@ name = "tablepro-driver-postgres" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "drivers_postgres" -path = "src/lib.rs" +publish.workspace = true [dependencies] -tablepro-core = { path = "../../core" } -tablepro-net = { path = "../../net" } +tablepro-core.workspace = true +tablepro-net.workspace = true async-trait.workspace = true bytes.workspace = true chrono.workspace = true @@ -29,16 +25,10 @@ tracing.workspace = true uuid.workspace = true [dev-dependencies] -tablepro-test-fixtures = { path = "../../test-fixtures" } -tablepro-test-support = { path = "../../test-support" } -async-trait.workspace = true -chrono.workspace = true -futures-util.workspace = true +tablepro-test-fixtures.workspace = true +tablepro-test-support.workspace = true rustls.workspace = true -secrecy.workspace = true tokio = { workspace = true, features = ["io-util", "macros", "rt-multi-thread", "test-util"] } -tokio-util = { workspace = true, features = ["rt"] } -uuid.workspace = true [lints] workspace = true diff --git a/linux/crates/drivers/postgres/tests/integration/conformance_engine.rs b/linux/crates/drivers/postgres/tests/integration/conformance_engine.rs index 3e4888aca5..e7dcc16992 100644 --- a/linux/crates/drivers/postgres/tests/integration/conformance_engine.rs +++ b/linux/crates/drivers/postgres/tests/integration/conformance_engine.rs @@ -4,10 +4,10 @@ use std::sync::Arc; use std::time::Duration; use async_trait::async_trait; -use drivers_postgres::{PgDriver, WORKSPACE_POOL_MAX_SIZE}; use tablepro_core::{ ConnectOptions, DatabaseDriver, LivenessPolicy, NetworkEndpoint, TableRef, TlsConfig, WorkspaceSettings, }; +use tablepro_driver_postgres::{PgDriver, WORKSPACE_POOL_MAX_SIZE}; use tablepro_test_fixtures::{HbaMode, PostgresFixture}; use tablepro_test_support::FaultTransport; use tablepro_test_support::conformance::{ diff --git a/linux/crates/drivers/postgres/tests/integration/metadata.rs b/linux/crates/drivers/postgres/tests/integration/metadata.rs index 929795f29e..cf98b8604c 100644 --- a/linux/crates/drivers/postgres/tests/integration/metadata.rs +++ b/linux/crates/drivers/postgres/tests/integration/metadata.rs @@ -506,7 +506,7 @@ async fn alter_add_column_then_query_bound_on_all_four_pooled_connections() { &["CREATE TABLE t (id int)", "INSERT INTO t VALUES (1)"], ) .await; - let warm = (0..drivers_postgres::WORKSPACE_POOL_MAX_SIZE).map(|_| { + let warm = (0..tablepro_driver_postgres::WORKSPACE_POOL_MAX_SIZE).map(|_| { let connection = connection.clone(); async move { connection @@ -527,7 +527,7 @@ async fn alter_add_column_then_query_bound_on_all_four_pooled_connections() { ) .await; - let reads = (0..drivers_postgres::WORKSPACE_POOL_MAX_SIZE).map(|_| { + let reads = (0..tablepro_driver_postgres::WORKSPACE_POOL_MAX_SIZE).map(|_| { let connection = connection.clone(); async move { connection diff --git a/linux/crates/drivers/postgres/tests/integration/support.rs b/linux/crates/drivers/postgres/tests/integration/support.rs index f448f46802..e8c38a7f53 100644 --- a/linux/crates/drivers/postgres/tests/integration/support.rs +++ b/linux/crates/drivers/postgres/tests/integration/support.rs @@ -5,7 +5,6 @@ use std::sync::{Arc, Mutex, PoisonError}; use std::time::Duration; use async_trait::async_trait; -use drivers_postgres::PgDriver; use secrecy::SecretString; use tablepro_core::statement::{GuardedStatement, Statement, StatementBuilder}; use tablepro_core::{ @@ -14,6 +13,7 @@ use tablepro_core::{ ResultSink, RunEnd, RunOptions, RunSummary, SinkFlow, TableRef, TlsConfig, Transport, UserSql, Value, WorkspaceSettings, WriteBatch, WriteKind, WriteReport, }; +use tablepro_driver_postgres::PgDriver; use tablepro_net::DirectTcpTransport; use tablepro_test_fixtures::{FixtureCredentials, PostgresFixture}; use tablepro_test_support::conformance::test_liveness; diff --git a/linux/crates/drivers/postgres/tests/integration/tls.rs b/linux/crates/drivers/postgres/tests/integration/tls.rs index 675c770bd5..15d1ec06d4 100644 --- a/linux/crates/drivers/postgres/tests/integration/tls.rs +++ b/linux/crates/drivers/postgres/tests/integration/tls.rs @@ -5,12 +5,12 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use async_trait::async_trait; -use drivers_postgres::PgDriver; use secrecy::SecretString; use tablepro_core::{ ClientIdentity, ConnectOptions, Credentials, DatabaseDriver, DriverError, ErrorCategory, TlsConfig, TlsFailure, TlsMode, WorkspaceSettings, }; +use tablepro_driver_postgres::PgDriver; use tablepro_net::tls::build_client_config; use tablepro_test_fixtures::{HbaMode, PkiAlgorithm, PkiFile, PostgresFixture, TestPki}; use tablepro_test_support::conformance::{ diff --git a/linux/crates/drivers/sqlite/Cargo.toml b/linux/crates/drivers/sqlite/Cargo.toml index 3bba6c801c..615a9f5a37 100644 --- a/linux/crates/drivers/sqlite/Cargo.toml +++ b/linux/crates/drivers/sqlite/Cargo.toml @@ -3,14 +3,10 @@ name = "tablepro-driver-sqlite" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "drivers_sqlite" -path = "src/lib.rs" +publish.workspace = true [dependencies] -tablepro-core = { path = "../../core" } +tablepro-core.workspace = true async-trait.workspace = true futures.workspace = true # Two direct calls sqlx does not wrap: sqlite3_get_autocommit, until sqlx @@ -26,11 +22,8 @@ tracing.workspace = true uuid.workspace = true [dev-dependencies] -tablepro-test-support = { path = "../../test-support" } -async-trait.workspace = true +tablepro-test-support.workspace = true tempfile.workspace = true -tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "sync", "time"] } -tracing.workspace = true tracing-subscriber.workspace = true [lints] diff --git a/linux/crates/drivers/sqlite/src/catalog.rs b/linux/crates/drivers/sqlite/src/catalog/mod.rs similarity index 100% rename from linux/crates/drivers/sqlite/src/catalog.rs rename to linux/crates/drivers/sqlite/src/catalog/mod.rs diff --git a/linux/crates/drivers/sqlite/src/ddl.rs b/linux/crates/drivers/sqlite/src/ddl/mod.rs similarity index 100% rename from linux/crates/drivers/sqlite/src/ddl.rs rename to linux/crates/drivers/sqlite/src/ddl/mod.rs diff --git a/linux/crates/drivers/sqlite/tests/csv_import.rs b/linux/crates/drivers/sqlite/tests/csv_import.rs index 487e5a104d..e3b93a075e 100644 --- a/linux/crates/drivers/sqlite/tests/csv_import.rs +++ b/linux/crates/drivers/sqlite/tests/csv_import.rs @@ -5,7 +5,6 @@ use std::sync::Arc; use std::time::Duration; -use drivers_sqlite::SqliteDriver; use sqlx::Connection as _; use sqlx::sqlite::{SqliteConnectOptions, SqliteConnection}; use tablepro_core::dml::build_insert; @@ -17,6 +16,7 @@ use tablepro_core::{ ForeignKeyMode, LivenessPolicy, QueryResult, RowLimit, Value, WorkspaceSettings, WriteBatch, WriteKind, WriteReport, }; +use tablepro_driver_sqlite::SqliteDriver; use tablepro_test_support::import_csv; use tempfile::TempDir; use tokio::time::Instant; diff --git a/linux/crates/drivers/sqlite/tests/integration/conformance_engine.rs b/linux/crates/drivers/sqlite/tests/integration/conformance_engine.rs index 593fd87183..b26d695a7d 100644 --- a/linux/crates/drivers/sqlite/tests/integration/conformance_engine.rs +++ b/linux/crates/drivers/sqlite/tests/integration/conformance_engine.rs @@ -5,13 +5,13 @@ use std::sync::Arc; use std::time::Duration; use async_trait::async_trait; -use drivers_sqlite::SqliteDriver; use sqlx::sqlite::{SqliteConnectOptions, SqliteConnection}; use sqlx::{Connection as _, Executor as _}; use tablepro_core::{ ConnectEnvironment, ConnectOptions, ConnectTarget, DatabaseDriver, FileEndpoint, LivenessPolicy, TableRef, WorkspaceSettings, }; +use tablepro_driver_sqlite::SqliteDriver; use tablepro_test_support::conformance::{ ConformanceDdlEngine, ConformanceEngine, ConformanceFailure, EditorTransactionEngine, PooledConformanceEngine, }; @@ -100,7 +100,7 @@ impl ConformanceEngine for SqliteEngine { } impl PooledConformanceEngine for SqliteEngine { - const WORKSPACE_POOL_MAX_SIZE: usize = drivers_sqlite::WORKSPACE_POOL_MAX_SIZE; + const WORKSPACE_POOL_MAX_SIZE: usize = tablepro_driver_sqlite::WORKSPACE_POOL_MAX_SIZE; } impl EditorTransactionEngine for SqliteEngine { diff --git a/linux/crates/drivers/sqlite/tests/integration/support.rs b/linux/crates/drivers/sqlite/tests/integration/support.rs index 46d6c14e4e..85669ed933 100644 --- a/linux/crates/drivers/sqlite/tests/integration/support.rs +++ b/linux/crates/drivers/sqlite/tests/integration/support.rs @@ -6,7 +6,6 @@ use std::sync::{Arc, Mutex, PoisonError}; use std::time::Duration; use async_trait::async_trait; -use drivers_sqlite::SqliteDriver; use sqlx::Connection as _; use sqlx::sqlite::{SqliteConnectOptions, SqliteConnection}; use tablepro_core::meta::TableRef; @@ -16,6 +15,7 @@ use tablepro_core::{ EditorSession, FileEndpoint, ForeignKeyMode, QueryResult, ResultEvent, ResultSink, RowLimit, RunOptions, RunSummary, SinkFlow, UserSql, WorkspaceSettings, WriteBatch, WriteKind, WriteReport, }; +use tablepro_driver_sqlite::SqliteDriver; use tablepro_test_support::conformance::test_liveness; use tempfile::TempDir; use tokio::time::Instant; diff --git a/linux/crates/drivers/sqlite/tests/statement_logging.rs b/linux/crates/drivers/sqlite/tests/statement_logging.rs index 5aa1b3aaa4..641183ad6a 100644 --- a/linux/crates/drivers/sqlite/tests/statement_logging.rs +++ b/linux/crates/drivers/sqlite/tests/statement_logging.rs @@ -10,7 +10,6 @@ use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::{Arc, OnceLock}; use std::time::Duration; -use drivers_sqlite::SqliteDriver; use sqlx::Connection as _; use sqlx::sqlite::{SqliteConnectOptions, SqliteConnection}; use tablepro_core::statement::StatementBuilder; @@ -18,6 +17,7 @@ use tablepro_core::{ CallOptions, ConnectEnvironment, ConnectOptions, ConnectTarget, DatabaseDriver, FileEndpoint, LivenessPolicy, RowLimit, WorkspaceSettings, }; +use tablepro_driver_sqlite::SqliteDriver; use tokio::time::Instant; use tokio_util::sync::CancellationToken; use tracing::Subscriber; diff --git a/linux/crates/drivers/sqlite/tests/values.rs b/linux/crates/drivers/sqlite/tests/values.rs index eaf7739001..bc1dc796aa 100644 --- a/linux/crates/drivers/sqlite/tests/values.rs +++ b/linux/crates/drivers/sqlite/tests/values.rs @@ -4,7 +4,6 @@ use std::sync::Arc; use std::time::Duration; -use drivers_sqlite::SqliteDriver; use sqlx::Connection as _; use sqlx::sqlite::{SqliteConnectOptions, SqliteConnection}; use tablepro_core::column::{BoolStorage, ColumnKind, TemporalZone}; @@ -14,6 +13,7 @@ use tablepro_core::{ CallOptions, ConnectEnvironment, ConnectOptions, ConnectTarget, Connection, DatabaseDriver, FileEndpoint, ForeignKeyMode, LivenessPolicy, QueryResult, RowLimit, Value, WorkspaceSettings, WriteBatch, WriteKind, }; +use tablepro_driver_sqlite::SqliteDriver; use tempfile::TempDir; use tokio::time::Instant; use tokio_util::sync::CancellationToken; diff --git a/linux/crates/net/Cargo.toml b/linux/crates/net/Cargo.toml index 54b70fdee0..b21e08553e 100644 --- a/linux/crates/net/Cargo.toml +++ b/linux/crates/net/Cargo.toml @@ -3,14 +3,10 @@ name = "tablepro-net" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "tablepro_net" -path = "src/lib.rs" +publish.workspace = true [dependencies] -tablepro-core = { path = "../core" } +tablepro-core.workspace = true async-trait.workspace = true pem-rfc7468.workspace = true rustls = { workspace = true, features = ["logging"] } diff --git a/linux/crates/session/Cargo.toml b/linux/crates/session/Cargo.toml index e9c183cf1a..7b7dfec6ce 100644 --- a/linux/crates/session/Cargo.toml +++ b/linux/crates/session/Cargo.toml @@ -3,11 +3,7 @@ name = "tablepro-session" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "tablepro_session" -path = "src/lib.rs" +publish.workspace = true [features] # FakeConnector and FakeCredentialSource for the tests of crates that @@ -15,11 +11,11 @@ path = "src/lib.rs" fakes = ["dep:tablepro-test-support"] [dependencies] -tablepro-core = { path = "../core" } -tablepro-net = { path = "../net" } -tablepro-ssh = { path = "../ssh" } -tablepro-storage = { path = "../storage" } -tablepro-test-support = { path = "../test-support", optional = true } +tablepro-core.workspace = true +tablepro-net.workspace = true +tablepro-ssh.workspace = true +tablepro-storage.workspace = true +tablepro-test-support = { workspace = true, optional = true } futures.workspace = true secrecy.workspace = true thiserror.workspace = true @@ -29,9 +25,9 @@ tracing.workspace = true uuid.workspace = true [dev-dependencies] -tablepro-driver-postgres = { path = "../drivers/postgres" } -tablepro-test-fixtures = { path = "../test-fixtures" } -tablepro-test-support = { path = "../test-support" } +tablepro-driver-postgres.workspace = true +tablepro-test-fixtures.workspace = true +tablepro-test-support.workspace = true tempfile.workspace = true tokio = { workspace = true, features = ["macros", "rt-multi-thread", "test-util", "sync"] } diff --git a/linux/crates/session/tests/session_postgres.rs b/linux/crates/session/tests/session_postgres.rs index a12b64996b..726d76161a 100644 --- a/linux/crates/session/tests/session_postgres.rs +++ b/linux/crates/session/tests/session_postgres.rs @@ -9,7 +9,6 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use std::time::Duration; -use drivers_postgres::{PgDriver, WORKSPACE_POOL_MAX_SIZE}; use secrecy::SecretString; use tablepro_core::credentials::CredentialInteraction; use tablepro_core::statement::{Statement, StatementBuilder}; @@ -17,6 +16,7 @@ use tablepro_core::{ CallOptions, ConnectEnvironment, ConnectOptions, ConnectTarget, Connection, Credentials, DatabaseDriver, DriverError, LivenessPolicy, NetworkEndpoint, NetworkTarget, RowLimit, TlsConfig, Value, WorkspaceSettings, }; +use tablepro_driver_postgres::{PgDriver, WORKSPACE_POOL_MAX_SIZE}; use tablepro_net::DirectTcpTransport; use tablepro_session::runtime::Tasks; use tablepro_session::{ diff --git a/linux/crates/ssh/Cargo.toml b/linux/crates/ssh/Cargo.toml index e7491d1ac2..c0d846d17d 100644 --- a/linux/crates/ssh/Cargo.toml +++ b/linux/crates/ssh/Cargo.toml @@ -3,22 +3,14 @@ name = "tablepro-ssh" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "tablepro_ssh" -path = "src/lib.rs" - -[[bin]] -name = "tablepro-askpass" -path = "src/bin/tablepro-askpass.rs" +publish.workspace = true [dependencies] -tablepro-core = { path = "../core" } +tablepro-core.workspace = true async-trait.workspace = true futures.workspace = true # mkdirat and openat with O_NOFOLLOW, and the effective uid, none of which std has. -rustix = { version = "1.1", default-features = false, features = ["std", "fs", "process"] } +rustix = { workspace = true, features = ["fs", "process"] } secrecy.workspace = true thiserror.workspace = true tokio = { workspace = true, features = ["io-util", "process", "net", "time", "sync", "fs"] } @@ -28,7 +20,7 @@ uuid.workspace = true zeroize.workspace = true [dev-dependencies] -tablepro-test-support = { path = "../test-support" } +tablepro-test-support.workspace = true tempfile.workspace = true testcontainers.workspace = true tokio = { workspace = true, features = ["macros", "rt", "test-util"] } diff --git a/linux/crates/storage/Cargo.toml b/linux/crates/storage/Cargo.toml index 41f6cfb259..8eaeeeca36 100644 --- a/linux/crates/storage/Cargo.toml +++ b/linux/crates/storage/Cargo.toml @@ -3,14 +3,10 @@ name = "tablepro-storage" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "tablepro_storage" -path = "src/lib.rs" +publish.workspace = true [dependencies] -tablepro-core = { path = "../core" } +tablepro-core.workspace = true async-trait.workspace = true oo7.workspace = true secrecy.workspace = true @@ -26,7 +22,6 @@ glib.workspace = true [dev-dependencies] tempfile.workspace = true -tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread"] } [lints] workspace = true diff --git a/linux/crates/test-fixtures/Cargo.toml b/linux/crates/test-fixtures/Cargo.toml index 9a5455c72c..358b0b14b0 100644 --- a/linux/crates/test-fixtures/Cargo.toml +++ b/linux/crates/test-fixtures/Cargo.toml @@ -3,15 +3,11 @@ name = "tablepro-test-fixtures" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "tablepro_test_fixtures" -path = "src/lib.rs" +publish.workspace = true [dependencies] rcgen.workspace = true -tablepro-test-support = { path = "../test-support" } +tablepro-test-support.workspace = true tempfile.workspace = true testcontainers.workspace = true testcontainers-modules = { workspace = true, features = ["postgres", "mssql_server"] } @@ -22,7 +18,6 @@ uuid.workspace = true [dev-dependencies] rustls.workspace = true tiberius.workspace = true -tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } tokio-rustls.workspace = true tokio-util = { workspace = true, features = ["compat"] } diff --git a/linux/crates/test-support/Cargo.toml b/linux/crates/test-support/Cargo.toml index a49820dec6..97aaae246a 100644 --- a/linux/crates/test-support/Cargo.toml +++ b/linux/crates/test-support/Cargo.toml @@ -3,15 +3,11 @@ name = "tablepro-test-support" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "tablepro_test_support" -path = "src/lib.rs" +publish.workspace = true [dependencies] -tablepro-core = { path = "../core" } -tablepro-net = { path = "../net" } +tablepro-core.workspace = true +tablepro-net.workspace = true async-trait.workspace = true secrecy.workspace = true tempfile.workspace = true diff --git a/linux/docs/adding-drivers.md b/linux/docs/adding-drivers.md index 0481dd29f5..713491a6a1 100644 --- a/linux/docs/adding-drivers.md +++ b/linux/docs/adding-drivers.md @@ -39,7 +39,7 @@ Open an issue before starting an engine that is not listed, and say which librar ## 2. The crate -`crates/drivers//`, package `tablepro-driver-`, library `drivers_`: +`crates/drivers//`, package `tablepro-driver-`, library `tablepro_driver_`: ```toml [package] @@ -47,15 +47,11 @@ name = "tablepro-driver-" edition.workspace = true rust-version.workspace = true license.workspace = true -publish = false - -[lib] -name = "drivers_" -path = "src/lib.rs" +publish.workspace = true [dependencies] -tablepro-core = { path = "../../core" } -tablepro-net = { path = "../../net" } +tablepro-core.workspace = true +tablepro-net.workspace = true async-trait.workspace = true secrecy.workspace = true tokio = { workspace = true, features = ["macros", "rt", "sync", "time"] } @@ -63,15 +59,15 @@ tokio-util = { workspace = true, features = ["rt"] } tracing.workspace = true [dev-dependencies] -tablepro-test-fixtures = { path = "../../test-fixtures" } -tablepro-test-support = { path = "../../test-support" } +tablepro-test-fixtures.workspace = true +tablepro-test-support.workspace = true tokio = { workspace = true, features = ["macros", "rt-multi-thread", "test-util"] } [lints] workspace = true ``` -A driver depends on `tablepro-core`, and on `tablepro-net` when it speaks TLS or dials TCP. `secrecy` reads the password of a password login. It never depends on GTK, on `tablepro-session`, on `tablepro-ssh` or on another driver. Add the crate to `members` in `linux/Cargo.toml`. +A driver depends on `tablepro-core`, and on `tablepro-net` when it speaks TLS or dials TCP. `secrecy` reads the password of a password login. It never depends on GTK, on `tablepro-session`, on `tablepro-ssh` or on another driver. Add the crate to `members` and to `[workspace.dependencies]` in `linux/Cargo.toml`. ## 3. `DatabaseDriver` and capabilities @@ -342,11 +338,11 @@ Add the crate to `crates/app/Cargo.toml` and register it in `build_registry` in ```rust fn build_registry() -> DriverRegistry { let mut r = DriverRegistry::new(); - r.register(Arc::new(drivers_clickhouse::ClickhouseDriver)); - r.register(Arc::new(drivers_mssql::MssqlDriver)); - r.register(Arc::new(drivers_mysql::MysqlDriver)); - r.register(Arc::new(drivers_postgres::PgDriver)); - r.register(Arc::new(drivers_sqlite::SqliteDriver)); + r.register(Arc::new(tablepro_driver_clickhouse::ClickhouseDriver)); + r.register(Arc::new(tablepro_driver_mssql::MssqlDriver)); + r.register(Arc::new(tablepro_driver_mysql::MysqlDriver)); + r.register(Arc::new(tablepro_driver_postgres::PgDriver)); + r.register(Arc::new(tablepro_driver_sqlite::SqliteDriver)); r } ``` diff --git a/linux/docs/testing.md b/linux/docs/testing.md index ff3661aaed..7e817d7a4d 100644 --- a/linux/docs/testing.md +++ b/linux/docs/testing.md @@ -24,7 +24,7 @@ mod tests { #[test] fn verify_full_is_default() { - let form = ConnectForm::new("postgres", drivers_postgres::PgDriver.capabilities()); + let form = ConnectForm::new("postgres", tablepro_driver_postgres::PgDriver.capabilities()); assert_eq!(form.tls.mode, TlsMode::VerifyFull); } @@ -352,7 +352,7 @@ The tests in `crates/app/src/ui/editor/script_runner.rs` drive `run_batches` und ### Structure review -`crates/app/src/workspace/structure_review_tests.rs` saves a structure tab through `WorkspaceHandle::save` on the `workspace::test_workspace::Workspace` harness and answers the review with `workspace::answer`. A dropped column shows the review with its SQL, Cancel sends nothing, Apply runs one write batch, an additive save on an engine that applies DDL in one transaction starts without a review, a draft changed during the review is not saved, and a second save during the review opens no second one. The close guard's own tests check that its Save reviews too, and that a declined review keeps the window open with no alert and starts none of the saves after it. +`crates/app/src/workspace/tests/structure_review.rs` saves a structure tab through `WorkspaceHandle::save` on the `workspace::test_workspace::Workspace` harness and answers the review with `workspace::answer`. A dropped column shows the review with its SQL, Cancel sends nothing, Apply runs one write batch, an additive save on an engine that applies DDL in one transaction starts without a review, a draft changed during the review is not saved, and a second save during the review opens no second one. The close guard's own tests check that its Save reviews too, and that a declined review keeps the window open with no alert and starts none of the saves after it. ## CI diff --git a/linux/meson_options.txt b/linux/meson.options similarity index 100% rename from linux/meson_options.txt rename to linux/meson.options diff --git a/linux/po/POTFILES.in b/linux/po/POTFILES.in index 126e77a2df..f11a8839e4 100644 --- a/linux/po/POTFILES.in +++ b/linux/po/POTFILES.in @@ -96,7 +96,6 @@ crates/app/src/services/tracker_delta.rs crates/app/src/services/tracker_edit.rs crates/app/src/services/undo_op.rs crates/app/src/storage.rs -crates/app/src/test_support.rs crates/app/src/test_support/accessible_label.rs crates/app/src/test_support/alert_response.rs crates/app/src/test_support/application_end.rs @@ -109,6 +108,7 @@ crates/app/src/test_support/key_injection_error.rs crates/app/src/test_support/key_injector.rs crates/app/src/test_support/main_loop.rs crates/app/src/test_support/memory_settings.rs +crates/app/src/test_support/mod.rs crates/app/src/test_support/owned_window.rs crates/app/src/test_support/shortcut_keys.rs crates/app/src/test_support/signal_log.rs @@ -238,13 +238,14 @@ crates/app/src/ui/error_text/ssh.rs crates/app/src/ui/error_text/tests.rs crates/app/src/ui/error_text/tls.rs crates/app/src/ui/error_text/tls_remedy.rs +crates/app/src/ui/export/dialog.rs crates/app/src/ui/export/document_sink.rs crates/app/src/ui/export/encoding_sink.rs crates/app/src/ui/export/export_failure_text.rs crates/app/src/ui/export/export_format.rs crates/app/src/ui/export/export_job.rs crates/app/src/ui/export/export_job_item.rs -crates/app/src/ui/export/export_ledger.rs +crates/app/src/ui/export/export_ledger/mod.rs crates/app/src/ui/export/export_ledger/tests.rs crates/app/src/ui/export/export_message.rs crates/app/src/ui/export/export_operations_button.rs @@ -255,9 +256,8 @@ crates/app/src/ui/export/export_scope.rs crates/app/src/ui/export/export_sink_parts.rs crates/app/src/ui/export/export_source.rs crates/app/src/ui/export/mod.rs -crates/app/src/ui/export/replace_file_writer.rs +crates/app/src/ui/export/replace_file_writer/mod.rs crates/app/src/ui/export/replace_file_writer/tests.rs -crates/app/src/ui/export_dialog.rs crates/app/src/ui/file_read.rs crates/app/src/ui/file_reveal/file_launcher_revealer.rs crates/app/src/ui/file_reveal/file_revealer.rs @@ -441,7 +441,6 @@ crates/app/src/ui/tab_load/stale_banner.rs crates/app/src/ui/welcome_view.rs crates/app/src/ui/window_geometry.rs crates/app/src/ui/workspace/close_flow.rs -crates/app/src/ui/workspace/close_tab_tests.rs crates/app/src/ui/workspace/editor_label.rs crates/app/src/ui/workspace/finished_work.rs crates/app/src/ui/workspace/health_banner.rs @@ -474,8 +473,10 @@ crates/app/src/ui/workspace/tab_identity.rs crates/app/src/ui/workspace/tab_index.rs crates/app/src/ui/workspace/tab_spec.rs crates/app/src/ui/workspace/tab_title.rs -crates/app/src/ui/workspace/tab_title_tests.rs crates/app/src/ui/workspace/table_naming.rs +crates/app/src/ui/workspace/tests/close_tab.rs +crates/app/src/ui/workspace/tests/mod.rs +crates/app/src/ui/workspace/tests/tab_title.rs crates/app/src/ui/workspace/unsaved_icon.rs crates/app/src/ui/workspace/window_tabs.rs crates/app/src/ui/workspace/window_title.rs @@ -522,12 +523,13 @@ crates/app/src/workspace/save_ticket.rs crates/app/src/workspace/schema_write.rs crates/app/src/workspace/session_key_record.rs crates/app/src/workspace/sort_record.rs -crates/app/src/workspace/structure_review_tests.rs crates/app/src/workspace/tab_directory.rs crates/app/src/workspace/tab_entry.rs crates/app/src/workspace/tab_record.rs crates/app/src/workspace/tab_snapshot.rs crates/app/src/workspace/test_workspace.rs +crates/app/src/workspace/tests/mod.rs +crates/app/src/workspace/tests/structure_review.rs crates/app/src/workspace/unknown_cause.rs crates/app/src/workspace/unknown_outcome_dialog.rs crates/app/src/workspace/waiting_dialog.rs diff --git a/linux/rustfmt.toml b/linux/rustfmt.toml index 58ea843aa9..8ad13f4c8e 100644 --- a/linux/rustfmt.toml +++ b/linux/rustfmt.toml @@ -1,3 +1,2 @@ edition = "2024" max_width = 120 -use_small_heuristics = "Default"