diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58fc317..42274da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,6 +157,8 @@ jobs: BARSQL_VERSION: ${{ needs.version.outputs.version }} run: | set -euo pipefail + # makepkg leaves zstd at level 3; Arch's own packages use --ultra -20. + echo 'COMPRESSZST=(zstd -c -T0 --ultra -20 -)' >> /etc/makepkg.conf stage="$(mktemp -d)" cp packaging/linux/PKGBUILD packaging/linux/BarSQL.desktop packaging/linux/barsql-*.png "$stage/" install -m 755 dist-linux/BarSQL "$stage/BarSQL" diff --git a/Cargo.lock b/Cargo.lock index ab8f80f..647bb6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,9 +121,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35f0f96ce78e38c3dc6d8948aa8163d06385be74000f3c7a95bf1eef35d3ea32" +checksum = "fc0fc36d7440d015b45468ba08a21e80e056ebbd014c611c6298bb7503e04bd1" dependencies = [ "cipher 0.5.2", "cpubits", @@ -138,7 +138,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f2b8006a0c83f52b62ba44a97b58bf76fe2f70a329e588f67f89691d93d498f" dependencies = [ "aead", - "aes 0.9.3", + "aes 0.9.4", "cipher 0.5.2", "ctr", "ctutils", @@ -186,6 +186,15 @@ dependencies = [ "equator", ] +[[package]] +name = "alloca" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7d05ea6aea7e9e64d25b9156ba2fee3fdd659e34e41063cd2fc7cd020d7f4" +dependencies = [ + "cc", +] + [[package]] name = "allocator-api2" version = "0.2.21" @@ -201,6 +210,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + [[package]] name = "annotate-snippets" version = "0.12.17" @@ -348,9 +363,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" dependencies = [ "async-task", "concurrent-queue", @@ -391,9 +406,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.4.2" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f" dependencies = [ "event-listener", "event-listener-strategy", @@ -626,7 +641,7 @@ dependencies = [ [[package]] name = "barsql" -version = "1.2.3" +version = "1.2.4" dependencies = [ "anyhow", "barsql-app", @@ -641,7 +656,7 @@ dependencies = [ [[package]] name = "barsql-app" -version = "1.2.3" +version = "1.2.4" dependencies = [ "async-channel", "barsql-core", @@ -669,7 +684,7 @@ dependencies = [ [[package]] name = "barsql-core" -version = "1.2.3" +version = "1.2.4" dependencies = [ "dirs 7.0.0", "hex", @@ -682,7 +697,7 @@ dependencies = [ [[package]] name = "barsql-db" -version = "1.2.3" +version = "1.2.4" dependencies = [ "anyhow", "async-channel", @@ -719,7 +734,7 @@ dependencies = [ [[package]] name = "barsql-io" -version = "1.2.3" +version = "1.2.4" dependencies = [ "barsql-core", "barsql-db", @@ -734,7 +749,7 @@ dependencies = [ [[package]] name = "barsql-sql" -version = "1.2.3" +version = "1.2.4" dependencies = [ "barsql-core", "libc", @@ -746,7 +761,7 @@ dependencies = [ [[package]] name = "barsql-storage" -version = "1.2.3" +version = "1.2.4" dependencies = [ "barsql-core", "serde", @@ -757,7 +772,7 @@ dependencies = [ [[package]] name = "barsql-ui" -version = "1.2.3" +version = "1.2.4" dependencies = [ "anyhow", "async-channel", @@ -1072,6 +1087,12 @@ version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +[[package]] +name = "c-enum" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd17eb909a8c6a894926bfcc3400a4bb0e732f5a57d37b1f14e8b29e329bace8" + [[package]] name = "calloop" version = "0.14.5" @@ -1096,6 +1117,12 @@ dependencies = [ "wayland-client", ] +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + [[package]] name = "cbc" version = "0.1.2" @@ -1183,6 +1210,33 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + [[package]] name = "cipher" version = "0.4.4" @@ -1206,6 +1260,31 @@ dependencies = [ "zeroize", ] +[[package]] +name = "clap" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" +dependencies = [ + "anstyle", + "clap_lex", +] + +[[package]] +name = "clap_lex" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" + [[package]] name = "cmake" version = "0.1.58" @@ -1507,13 +1586,48 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055" +checksum = "5f97d3416d5337d15c4b0d78c8c91df922ca143f57ec20e2d1c188333047ef04" dependencies = [ "cfg-if", ] +[[package]] +name = "criterion" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "950046b2aa2492f9a536f5f4f9a3de7b9e2476e575e05bd6c333371add4d98f3" +dependencies = [ + "alloca", + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "itertools 0.13.0", + "num-traits", + "oorandom", + "page_size", + "plotters", + "rayon", + "regex", + "serde", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d80a2f4f5b554395e47b5d8305bc3d27813bacb73493eb1001e8f76dae29ea" +dependencies = [ + "cast", + "itertools 0.13.0", +] + [[package]] name = "crossbeam-deque" version = "0.8.8" @@ -1623,9 +1737,9 @@ dependencies = [ [[package]] name = "ctutils" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2376ffd6f96d8a9db59875b4b6b0237d6900b5baf64279714e05493ce64828a" +checksum = "261af4dc7a06ea8a527a8717d8cbba3417530d6ea14e1edb3de6b67806be474f" dependencies = [ "cmov", "subtle", @@ -2829,9 +2943,9 @@ dependencies = [ [[package]] name = "gpui-base" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d862bc8f2e27710039013d075ac4995892e9687ff207fa530f880cbcd513936f" +checksum = "cff6377e30f0c857681662e7edc7286bf30f5606033390401b0706d7bd930833" dependencies = [ "aho-corasick", "anyhow", @@ -2871,9 +2985,9 @@ dependencies = [ [[package]] name = "gpui-component" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ce53430332e30f303364eaabfa10ed2aa23dfaf2a147e04370e0e9c423578b" +checksum = "45bbfdba0efa392190f2fd446ec311325302eb047d5ce45dc1bcf189cb18f5eb" dependencies = [ "anyhow", "chrono", @@ -2923,9 +3037,9 @@ dependencies = [ [[package]] name = "gpui-component-macros" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a512c830553e7dddc43c3f8faffc2d2d7bd24db21fe3dc1326dde9c470013768" +checksum = "21ac1d2ca5352973e291b3316c027e603b1e7334755341f44c8231f85fde627a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2935,9 +3049,9 @@ dependencies = [ [[package]] name = "gpui-fast" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87b6d2f355531132e8f1ec357cb23901aba1d1b3e522260822ae199f02ec32da" +checksum = "7ee67914f779fdcfce4c7f59f6ba8fa68f680bd137648b25a801cd5d9cb1b8ab" dependencies = [ "accesskit", "anyhow", @@ -2946,7 +3060,6 @@ dependencies = [ "backtrace", "bitflags 2.13.2", "chrono", - "ctor", "derive_more", "embed-resource", "etagere", @@ -2954,6 +3067,7 @@ dependencies = [ "futures-concurrency", "getrandom 0.3.4", "gpui-fast-macros", + "gpui-pre-bench-metrics", "gpui-pre-collections", "gpui-pre-http-client", "gpui-pre-refineable", @@ -2962,6 +3076,7 @@ dependencies = [ "gpui-pre-sum-tree", "gpui-pre-util", "heapless", + "icu_segmenter", "image", "inventory", "itertools 0.14.0", @@ -2993,6 +3108,7 @@ dependencies = [ "taffy", "thiserror 2.0.21", "ttf-parser", + "unicode-segmentation", "url", "usvg 0.46.0", "uuid", @@ -3004,9 +3120,9 @@ dependencies = [ [[package]] name = "gpui-fast-apple" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f0aff0a75a63953782a609bf023c68cdb71c3dbd74478223db9bbd1b744795" +checksum = "6cdf402e4a795abb27cd9545a6b519f123f4f2b8050fc7f6e7e25e376f34867d" dependencies = [ "anyhow", "async-task", @@ -3016,10 +3132,8 @@ dependencies = [ "core-foundation-sys", "core-graphics 0.24.0", "core-text", - "derive_more", "dispatch2", "etagere", - "foreign-types", "futures", "gpui-fast", "gpui-pre-collections", @@ -3028,9 +3142,9 @@ dependencies = [ "libc", "log", "mach2", - "metal", "objc2 0.6.5", "objc2-core-foundation", + "objc2-core-graphics", "objc2-core-text", "objc2-core-video", "objc2-foundation 0.3.2", @@ -3046,9 +3160,9 @@ dependencies = [ [[package]] name = "gpui-fast-linux" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d5a4351392d339049584e06a58460a4907a060e3f46e49b7c130d80ffe36871" +checksum = "59c465cccb420a54d2abc14af42ce82ecb1ea473b531ddbd299eb4e15ae2dd83" dependencies = [ "accesskit", "accesskit_unix", @@ -3091,9 +3205,9 @@ dependencies = [ [[package]] name = "gpui-fast-macos" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e8b377d6dcbc0007e68098cb3f40bc2591a1d29526301e9572a70bb674f171" +checksum = "d809f618f836aff7fc654c00c3f6e64d41abd83713140998dd83e8ad6906b1e9" dependencies = [ "accesskit", "accesskit_macos", @@ -3119,6 +3233,8 @@ dependencies = [ "objc2-core-graphics", "objc2-core-video", "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", + "objc2-uniform-type-identifiers", "objc2-user-notifications", "parking_lot", "raw-window-handle", @@ -3130,9 +3246,9 @@ dependencies = [ [[package]] name = "gpui-fast-macros" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e07e9e22196a84bb8cb06c19fc6e5d2218fa11d6b573f914f423970a1b38c97e" +checksum = "46724abd05d2c874cc31e1996bb862539c5735780dd363cb550469003a6e5140" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -3142,9 +3258,9 @@ dependencies = [ [[package]] name = "gpui-fast-platform" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c4b2959631b713899ae6d58236a0ac7c7e404a6cd8c16f30822177eb90a5b59" +checksum = "eb75fcc655a819d87a75180f32528d26b869b421a53c5974046c6e2948c46ecf" dependencies = [ "anyhow", "console_error_panic_hook", @@ -3159,9 +3275,9 @@ dependencies = [ [[package]] name = "gpui-fast-web" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad903fddb78ae4c8f1c24b7fa07c79a0697da7614183d8c7dad67bd296802901" +checksum = "f5194d398f801160d6be5660055a14b175aed9b2dbca348d56065d742b11dbd9" dependencies = [ "anyhow", "async-channel", @@ -3189,9 +3305,9 @@ dependencies = [ [[package]] name = "gpui-fast-wgpu" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebf72d3c1fee16dde347707ef306940d39656f80e35d3aaace01075996f12199" +checksum = "7a3be892e9d079745739d0e52e397fd43b61d215de4fd1477bb554a9bcf0c7e1" dependencies = [ "anyhow", "bytemuck", @@ -3217,9 +3333,9 @@ dependencies = [ [[package]] name = "gpui-fast-windows" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a1a193343ef7faaa18eb9ccc0aadf8ec9571f2791c4419c2ca23aa17198f970" +checksum = "088654835f1408e1aaa79afcc316530461a14fa1c4e543d47b1881b6ced63f19" dependencies = [ "accesskit", "accesskit_windows", @@ -3247,9 +3363,9 @@ dependencies = [ [[package]] name = "gpui-kit" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25210f6e59ea9ffac3a033dbce9edafe5ff0dd2900f894fd1316f54da2fe2b89" +checksum = "2c464934b5cdb85dd3fc511e60d09fb446fba422de159a80038368f52893c14b" dependencies = [ "gpui-base", "gpui-component", @@ -3264,9 +3380,9 @@ dependencies = [ [[package]] name = "gpui-kit-assets" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c214017b45e5654665f18faa551f58a2c2c8d25efe6632b1a443ba8edf365e96" +checksum = "956a9864880e1f230e274a74cea8006e5018b8af383ad7bbd30b6b18254a97a9" dependencies = [ "anyhow", "gpui-pre", @@ -3279,9 +3395,9 @@ dependencies = [ [[package]] name = "gpui-pre" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df4b5f8d0c278308df2f11e0bfe0212dd77d7848ce1bdc4b9d513334414396f6" +checksum = "9303c771abf2acff2a96d706f69d9a82088c4770173a07cce88f0002431d887d" dependencies = [ "accesskit", "anyhow", @@ -3290,13 +3406,13 @@ dependencies = [ "backtrace", "bitflags 2.13.2", "chrono", - "ctor", "derive_more", "embed-resource", "etagere", "futures", "futures-concurrency", "getrandom 0.3.4", + "gpui-pre-bench-metrics", "gpui-pre-collections", "gpui-pre-http-client", "gpui-pre-macros", @@ -3306,6 +3422,7 @@ dependencies = [ "gpui-pre-sum-tree", "gpui-pre-util", "heapless", + "icu_segmenter", "image", "inventory", "itertools 0.14.0", @@ -3337,6 +3454,7 @@ dependencies = [ "taffy", "thiserror 2.0.21", "ttf-parser", + "unicode-segmentation", "url", "usvg 0.46.0", "uuid", @@ -3348,9 +3466,9 @@ dependencies = [ [[package]] name = "gpui-pre-apple" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97cd068d8134b4e073321b946491760aa1e4511e486084a92e73b9174bff78a" +checksum = "8c0bea8ffa563d3a1ada533e148bb55be7fb873c178979e889a3d1204f8e1b91" dependencies = [ "anyhow", "async-task", @@ -3360,10 +3478,8 @@ dependencies = [ "core-foundation-sys", "core-graphics 0.24.0", "core-text", - "derive_more", "dispatch2", "etagere", - "foreign-types", "futures", "gpui-pre", "gpui-pre-collections", @@ -3372,9 +3488,9 @@ dependencies = [ "libc", "log", "mach2", - "metal", "objc2 0.6.5", "objc2-core-foundation", + "objc2-core-graphics", "objc2-core-text", "objc2-core-video", "objc2-foundation 0.3.2", @@ -3388,11 +3504,23 @@ dependencies = [ "zed-font-kit", ] +[[package]] +name = "gpui-pre-bench-metrics" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2380f9a4c76fbbf035fe0b83e7054216e0dbacb18e2a95bb26c27bda22376e3" +dependencies = [ + "anyhow", + "criterion", + "libc", + "perf-event2", +] + [[package]] name = "gpui-pre-collections" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f89bf8941a7437dd761161c552543fb8268b9633fe74e29eafbe0014cd2164b" +checksum = "06882d54d40681ae3b145af9ef8a4021c2bf9967cc0a9fcf0cc50f003bf3cdf3" dependencies = [ "gpui-pre-util", "indexmap", @@ -3401,9 +3529,9 @@ dependencies = [ [[package]] name = "gpui-pre-derive-refineable" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2998b1cebbaa0fa004fe4939a513bbf4103c7fb69ae2e84ee73634554e3f7edc" +checksum = "3999591b50cfd74f1734baf97fe802cce5f282d60d85b908e3393d534fbd50fb" dependencies = [ "proc-macro2", "quote", @@ -3412,9 +3540,9 @@ dependencies = [ [[package]] name = "gpui-pre-http-client" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e516820ee56ac357a87ff97b1a2c5f22c8d5dcd2a50cdd15c16949f24464d98e" +checksum = "a00ff0e68341f52c5903182d7e2e2d7dc247d87b0d9947ce3564e453720347a0" dependencies = [ "anyhow", "bytes", @@ -3431,9 +3559,9 @@ dependencies = [ [[package]] name = "gpui-pre-ios" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5773a1e3a399df64f3ecc5538727fd0575279bd190959cf97a9e2b698c0310b8" +checksum = "326382c3b3f004617ac0f61338594c00f053b08b7875f3486ea0f221e9b20a75" dependencies = [ "anyhow", "block2 0.6.2", @@ -3453,9 +3581,9 @@ dependencies = [ [[package]] name = "gpui-pre-linux" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c6ffd2dce7b75cce0bb3382994912f84c2a05389a4a236bb8bd72cb098fc083" +checksum = "79cac5cbd3485c1e3db8eafd5dc69019188f5cb0a39846946af772efa386f624" dependencies = [ "accesskit", "accesskit_unix", @@ -3498,9 +3626,9 @@ dependencies = [ [[package]] name = "gpui-pre-macos" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e07a5e5c84f0b2160c194a1c852cc89d1942db66867938ceabcd7f763cb4386" +checksum = "d7410cfdaa1fa55a414346cc492d18ce340e3a8b6d0ac3213b984ed690c82b92" dependencies = [ "accesskit", "accesskit_macos", @@ -3526,6 +3654,8 @@ dependencies = [ "objc2-core-graphics", "objc2-core-video", "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", + "objc2-uniform-type-identifiers", "objc2-user-notifications", "parking_lot", "raw-window-handle", @@ -3537,9 +3667,9 @@ dependencies = [ [[package]] name = "gpui-pre-macros" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c95d70a9fe10701533606c6135f9a1d4cd96e87e4e6062b3d426eb57b415daf" +checksum = "ee1c52959baa6834db3183e86affe70242ca90b4fc64ed2ae6dd689a799ce78e" dependencies = [ "heck 0.5.0", "proc-macro-crate", @@ -3550,9 +3680,9 @@ dependencies = [ [[package]] name = "gpui-pre-platform" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a7f07a15187e82ec76491492c7e3245db1b59633d3bedb00b828ffaf67c4b8" +checksum = "175f55bd6a80ea3bb0cf44d9ba454a3312381d66e702b3b5e99f73a7ca1738ee" dependencies = [ "anyhow", "console_error_panic_hook", @@ -3567,9 +3697,9 @@ dependencies = [ [[package]] name = "gpui-pre-refineable" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ce7e83592bc6c1ead2affd91b333f11b60c3eb7d06cae1605dd56f149fe8674" +checksum = "097375d98fecafd6e00ec13c7711709cc6d827ccad385694ce9e2c2f570c02a5" dependencies = [ "gpui-pre-derive-refineable", ] @@ -3626,9 +3756,9 @@ dependencies = [ [[package]] name = "gpui-pre-scheduler" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c2c6b0fabcd20e6773a0be30afa1f25637c53a06201bb80ab24a21fe198865" +checksum = "93c3c9f76341cdf03801699d68876915b42d5858e80c52a141ebfc350358147b" dependencies = [ "async-task", "backtrace", @@ -3643,9 +3773,9 @@ dependencies = [ [[package]] name = "gpui-pre-shared-string" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8068f94355f173558a51998a32985a434af54cc6c7262a060fffc369a505998f" +checksum = "781aaf9a9c19e3367b94100c7b1a17283721766bc890909ce8aa34e8c5b1a99a" dependencies = [ "schemars", "serde", @@ -3654,9 +3784,9 @@ dependencies = [ [[package]] name = "gpui-pre-sum-tree" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ce66c57e9b5fd6c7a90fa9f9de2f9bb342127d670ca3c8fe5885270079eefa" +checksum = "e0cb18765472fb2c64b7e6374f9a36f512ce25b1ccb3662fff51788564107eb3" dependencies = [ "gpui-pre-ztracing", "heapless", @@ -3666,9 +3796,9 @@ dependencies = [ [[package]] name = "gpui-pre-util" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162dc29b2d2c0223ee4bb4e9f5e913eab4f62cad0943eb0c1122a74ac82b0768" +checksum = "49036ad9887034f8d6652b65761ee1c1fdbd7d66be33a6088245fae54dc643e3" dependencies = [ "anyhow", "log", @@ -3677,9 +3807,9 @@ dependencies = [ [[package]] name = "gpui-pre-web" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1acd86af2347f0dd8b63c441a5dbd43b3fcd7dac69b340827c3497da5a13d6fb" +checksum = "ad51fcf6e251d45b092fd4a98a26325eb9cf6ad4e6228b0c6bc50672db9e0563" dependencies = [ "anyhow", "async-channel", @@ -3707,9 +3837,9 @@ dependencies = [ [[package]] name = "gpui-pre-wgpu" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce693915768aae38bf788f245af75aae78e3e1179245860fc80ce831d0a8f74e" +checksum = "211cf352de1a0b0c9bea3f105df5572ce1d2c899389b924a888e5af36b50f93d" dependencies = [ "anyhow", "bytemuck", @@ -3735,9 +3865,9 @@ dependencies = [ [[package]] name = "gpui-pre-windows" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80670f987b920fba019917b2e222ecf2b377f2a6d77872010c7d284c235837b3" +checksum = "5141a3db59bab761a16ab19529fe4117a86e91922e8fc00af6dfc4829cb1744d" dependencies = [ "accesskit", "accesskit_windows", @@ -3765,9 +3895,9 @@ dependencies = [ [[package]] name = "gpui-pre-ztracing" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "814cc08c526961c88703806a68ba4cf216a1d988ffbbdc673304f4dd25858952" +checksum = "7ac9274f4fb36ce6bf128f9b48032196a3120cb858503af33ced6c21366cf2f7" dependencies = [ "gpui-pre-ztracing-macro", "tracing", @@ -3775,9 +3905,9 @@ dependencies = [ [[package]] name = "gpui-pre-ztracing-macro" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f9dae92b9bc15baa6e530c90bdd4c689d3710bd4d18c3566deb1d6ae182daf" +checksum = "99b18b06f5026b3d312488eacfdddbe78f82b4bf32bb2d2bc3186e31e552b797" [[package]] name = "granit-parser" @@ -4133,11 +4263,32 @@ checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" dependencies = [ "displaydoc", "litemap", + "serde", "tinystr", "writeable", "zerovec", ] +[[package]] +name = "icu_locale_fallback" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "406e9ae5b95d8aa37db6293405931b766a6172d1848daee22d70eb44aa78a43c" +dependencies = [ + "icu_locale_core", + "icu_locale_fallback_data", + "icu_provider", + "potential_utf", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locale_fallback_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3632ebbd0c5c3637ba1a40bdf8288f2cb9d2268e73441a69d5fc73d7cfbaa87c" + [[package]] name = "icu_normalizer" version = "2.4.0" @@ -4187,6 +4338,8 @@ checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" dependencies = [ "displaydoc", "icu_locale_core", + "serde", + "stable_deref_trait", "writeable", "yoke", "zerofrom", @@ -4194,6 +4347,29 @@ dependencies = [ "zerovec", ] +[[package]] +name = "icu_segmenter" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61b195dc605f81aa181bec9b3bd14e26cc71b903e4644f6af578ca9772c7a710" +dependencies = [ + "icu_collections", + "icu_locale_fallback", + "icu_provider", + "icu_segmenter_data", + "potential_utf", + "smallvec", + "utf8_iter", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_segmenter_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "913a7d294ad056474749152107309fdee3ec17d2482d1ab70fdc61a81c64b9a3" + [[package]] name = "ident_case" version = "1.0.1" @@ -4451,9 +4627,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jiff" -version = "0.2.38" +version = "0.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" +checksum = "3ac703058abac89e5c39b0b879dce2b6b14a4ba36600c7e7e3d0c60a6883ef3c" dependencies = [ "defmt", "jiff-core", @@ -4468,9 +4644,9 @@ dependencies = [ [[package]] name = "jiff-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c" +checksum = "aee43309eb53bafb8c36d35d6e444769c8f8e6206a9fbf7546f5db9d7d4a0e93" dependencies = [ "defmt", "log", @@ -4478,9 +4654,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.38" +version = "0.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" +checksum = "6dc32470c67eb7d0e9ccb74303fa925313dc04cecb1aa048beaa6f391e36a93d" dependencies = [ "jiff-core", "proc-macro2", @@ -5002,21 +5178,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "metal" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7047791b5bc903b8cd963014b355f71dc9864a9a0b727057676c1dcae5cbc15" -dependencies = [ - "bitflags 2.13.2", - "block", - "core-graphics-types 0.2.0", - "foreign-types", - "log", - "objc", - "paste", -] - [[package]] name = "mime" version = "0.3.17" @@ -5550,6 +5711,7 @@ dependencies = [ "objc2-core-video", "objc2-foundation 0.3.2", "objc2-quartz-core 0.3.2", + "objc2-uniform-type-identifiers", ] [[package]] @@ -5732,6 +5894,7 @@ checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" dependencies = [ "bitflags 2.13.2", "block2 0.6.2", + "dispatch2", "objc2 0.6.5", "objc2-foundation 0.3.2", ] @@ -5795,6 +5958,16 @@ dependencies = [ "objc2-quartz-core 0.3.2", ] +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7902ac02859fc1f7045f8b598c63f1ae0cc7efeaa06a9bc9f3d9a3c955974fa4" +dependencies = [ + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-user-notifications" version = "0.3.2" @@ -5875,6 +6048,12 @@ dependencies = [ "zvariant", ] +[[package]] +name = "oorandom" +version = "11.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" + [[package]] name = "open" version = "5.4.5" @@ -5957,6 +6136,16 @@ dependencies = [ "sha2 0.11.1", ] +[[package]] +name = "page_size" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "pageant" version = "0.2.5" @@ -6081,6 +6270,41 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "perf-event-data" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "575828d9d7d205188048eb1508560607a03d21eafdbba47b8cade1736c1c28e1" +dependencies = [ + "bitflags 2.13.2", + "c-enum", + "perf-event-open-sys2", +] + +[[package]] +name = "perf-event-open-sys2" +version = "5.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c25955321465255e437600b54296983fab1feac2cd0c38958adeb26dbae49e" +dependencies = [ + "libc", + "memoffset", +] + +[[package]] +name = "perf-event2" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0939b8fad77dfaeb29ebbd35faaeaadbf833167f30975f1b8993bbba09ea0a0f" +dependencies = [ + "bitflags 2.13.2", + "c-enum", + "libc", + "memmap2", + "perf-event-data", + "perf-event-open-sys2", +] + [[package]] name = "phc" version = "0.6.1" @@ -6231,7 +6455,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63d440a804ec8d6fafbb6b84471e013286658d373248927692ab3366686220ca" dependencies = [ - "aes 0.9.3", + "aes 0.9.4", "aes-gcm", "cbc 0.2.1", "der 0.8.3", @@ -6260,6 +6484,34 @@ version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + [[package]] name = "png" version = "0.17.16" @@ -6409,6 +6661,8 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" dependencies = [ + "serde_core", + "writeable", "zerovec", ] @@ -7190,7 +7444,7 @@ version = "0.65.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bb77a4b259312b2abbc541bca1c13cb4e9b61c560a7fd894068c3b92e0c9dc3" dependencies = [ - "aes 0.9.3", + "aes 0.9.4", "bitflags 2.13.2", "block-padding 0.4.2", "byteorder", @@ -8130,7 +8384,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d801accda99469cde6d73da741422610fdf6508a72d9a69d1b55cb241c720597" dependencies = [ "aead", - "aes 0.9.3", + "aes 0.9.4", "aes-gcm", "chacha20", "cipher 0.5.2", @@ -8671,9 +8925,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" dependencies = [ "displaydoc", + "serde_core", "zerovec", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.13.3" @@ -9125,9 +9390,9 @@ checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" [[package]] name = "unicode-script" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" +checksum = "aa04c955db05429d464c74d495c1ee677e1866e783a4c3747f9c0cef7756cabf" [[package]] name = "unicode-segmentation" @@ -9171,9 +9436,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "3.5.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde93ff05758a36a851a398a772b0b79a82fbe3c186a46f2696baaeaf84c966b" +checksum = "e7be76686bdf7198002062423ca0d8cf9b75a27c8e1de804513b97e97b555d9d" dependencies = [ "base64 0.23.1", "log", @@ -9187,9 +9452,9 @@ dependencies = [ [[package]] name = "ureq-proto" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841583fc36089d7d59419568ae157f43a5a03a2e5a81ba87c77d1596ef46e922" +checksum = "622dce33c252115466d83f63e9744a18f12b4406aae51a01c15ad8fcf1185eb3" dependencies = [ "base64 0.23.1", "http", @@ -10958,6 +11223,7 @@ dependencies = [ "displaydoc", "yoke", "zerofrom", + "zerovec", ] [[package]] @@ -10966,6 +11232,7 @@ version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" dependencies = [ + "serde", "yoke", "zerofrom", "zerovec-derive", @@ -10984,14 +11251,15 @@ dependencies = [ [[package]] name = "zip" -version = "9.2.1" +version = "9.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848dad21639597378c3be94c59fd4de683f0f6d8a5387575896e1245737d4f37" +checksum = "e408c6cc4699dd017d53dc080cd51c2cea2b5354af57a1479bd265ed42911487" dependencies = [ "crc32fast", "flate2", "getrandom 0.4.3", "indexmap", + "libc", "memchr", "nix", "typed-path", diff --git a/Cargo.toml b/Cargo.toml index 1c061ca..49f5280 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "3" members = ["crates/*", "xtask"] [workspace.package] -version = "1.2.3" +version = "1.2.4" edition = "2024" license = "GPL-3.0-only" publish = false @@ -26,7 +26,7 @@ dunce = "1.0.5" enumflags2 = "0.7" flate2 = "1" futures-util = "0.3" -gpui-kit = { version = "=0.8.1", features = ["tree-sitter-sql", "tree-sitter-html"] } +gpui-kit = { version = "=0.9.0", features = ["tree-sitter-sql", "tree-sitter-html"] } hex = "0.4" httparse = "1" interprocess = "2" diff --git a/README.md b/README.md index ed9fabf..152f24c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Grab the latest build for **Windows**, **macOS**, or **Linux** from the [**Relea - **Windows**: `BarSQL-windows-amd64.zip` (portable) **or** `BarSQL-amd64-installer.exe` (installer) - **Linux**: `BarSQL-linux-amd64.tar.gz` (portable) -- **macOS**: `BarSQL-darwin-arm64.zip` **or** `BarSQL-darwin-amd64.zip` (the same universal `.app`) +- **macOS**: `BarSQL-darwin-arm64.zip` (Apple Silicon) **or** `BarSQL-darwin-amd64.zip` (Intel) ### Additional options: diff --git a/RELEASING.md b/RELEASING.md index 1379853..a25f1d0 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -12,16 +12,17 @@ Run the workflow by hand with the version left empty to build the packages witho | Script | Portable updater asset (one top-level entry) | Other downloads | | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -| `scripts/package-macos.sh` | `BarSQL-darwin-arm64.zip`, `BarSQL-darwin-amd64.zip` (the same universal `BarSQL.app`) | `BarSQL-macos-universal.dmg` | +| `scripts/package-macos.sh` | `BarSQL-darwin-arm64.zip`, `BarSQL-darwin-amd64.zip` (a `BarSQL.app` per architecture) | `BarSQL-macos-universal.dmg` | | `scripts/package-windows.sh` | `BarSQL-windows-amd64.zip` (`BarSQL.exe`) | `BarSQL.exe`, `BarSQL-amd64-installer.exe` | | `scripts/package-linux.sh` | `BarSQL-linux-amd64.tar.gz` (`BarSQL`) | `BarSQL`, `BarSQL.deb`, `BarSQL.rpm`, `BarSQL-x86_64.AppImage` | | `packaging/linux/PKGBUILD` (release workflow, in an Arch Linux container) | | `BarSQL.pkg.tar.zst` | - Only the portable updater assets name both a platform and an architecture, so portable copies never pick another download. The AppImage and the packages update from their own asset, and the installer and the dmg from the `.zip`. - Release builds turn on the `production` feature, which enables the update check at launch. The release profile uses thin LTO and strips symbols. -- **macOS:** a `lipo` universal `.app` for macOS 12 and later with an ad-hoc signature; the dmg adds an `Applications` link. `BARSQL_NATIVE_ONLY=1` builds this Mac's architecture alone. +- **macOS:** an `.app` for macOS 12 and later with an ad-hoc signature. Each zip holds its own architecture alone, half the size of a universal app, since the updater downloads the zip for the Mac's own chip, even from an Intel build running under Rosetta. The dmg holds a `lipo` universal app and an `Applications` link, so a copy installed from it keeps only its own architecture after its first update. `BARSQL_NATIVE_ONLY=1` builds this Mac's architecture alone. - **Windows:** `crates/barsql/build.rs` embeds the icon and the version block. `packaging/windows/installer.nsi` installs the app with the `SQLite Database` file class for `.db`, `.sqlite`, `.sqlite3`, `.s3db` and `.sl3`. - **Linux:** [`cargo-deb`](https://crates.io/crates/cargo-deb) and [`cargo-generate-rpm`](https://crates.io/crates/cargo-generate-rpm) build the deb and rpm from `crates/barsql/Cargo.toml`, and `makepkg` builds the Arch package from `packaging/linux/PKGBUILD`. Each installs `/usr/bin/BarSQL` and a desktop entry that opens SQLite files; the deb and rpm work out their library dependencies from the binary. The window's app id is `BarSQL`, so Wayland docks match it to `BarSQL.desktop`. +- **Compression:** the dmg is LZMA (`ULMO`, which macOS 10.15 and later open), the installer uses a 64 MB LZMA dictionary, the rpm an xz payload and the Arch package `zstd --ultra -20`. The deb keeps cargo-deb's xz and the AppImage appimagetool's zstd. The updater assets stay deflate `.zip` and gzip `.tar.gz`, the only formats released versions unpack. - The icon's source is `packaging/icon.svg`. The macOS `.icns` sets it on Apple's icon grid (an 824px body on a 1024px canvas, with a shadow). Windows and Linux show the stack without its tile, since their taskbars and docks are mostly dark and the dark tile would disappear there, leaving the stack looking small. The title bar shows the stack too, in a dark and a light version (`crates/barsql-ui/images/barsql-mark-*.svg`). `cargo xtask icons` regenerates the set from it: the Linux PNGs, `icon.ico`, `icons.icns` and `docs/icon.png`, each size rendered from the vector, and the SVG copies for the app (the marks and its icon) and `docs/`. ## How Updates Work diff --git a/crates/barsql-app/src/update.rs b/crates/barsql-app/src/update.rs index e070e16..4928531 100644 --- a/crates/barsql-app/src/update.rs +++ b/crates/barsql-app/src/update.rs @@ -162,6 +162,7 @@ pub fn platform() -> &'static str { pub fn arch() -> &'static str { match std::env::consts::ARCH { + "x86_64" if under_rosetta() => "arm64", "x86_64" => "amd64", "aarch64" => "arm64", "x86" => "386", @@ -169,6 +170,28 @@ pub fn arch() -> &'static str { } } +// An Intel build under Rosetta asks for the Apple Silicon one, which runs natively. +#[cfg(target_os = "macos")] +fn under_rosetta() -> bool { + let (mut translated, mut size): (libc::c_int, libc::size_t) = (0, size_of::()); + // SAFETY: a NUL-terminated name, and an int buffer with its size. + let result = unsafe { + libc::sysctlbyname( + c"sysctl.proc_translated".as_ptr(), + (&raw mut translated).cast(), + &mut size, + std::ptr::null_mut(), + 0, + ) + }; + result == 0 && translated == 1 +} + +#[cfg(not(target_os = "macos"))] +fn under_rosetta() -> bool { + false +} + pub fn check(base: &str, current: &str, kind: Kind, platform: &str, arch: &str) -> Result, String> { let agent = agent(); let endpoint = format!("{base}/repos/{REPOSITORY}/releases/latest"); diff --git a/crates/barsql-ui/src/scenarios/driver.rs b/crates/barsql-ui/src/scenarios/driver.rs index 75fd1a3..c729896 100644 --- a/crates/barsql-ui/src/scenarios/driver.rs +++ b/crates/barsql-ui/src/scenarios/driver.rs @@ -471,12 +471,12 @@ impl Driver<'_> { self.pause(); } - // As `context_submenu`, for a button's menu. + // As `context_submenu`, for a button's menu ending in the submenu. Up reaches it past items that may be disabled. #[cfg(feature = "e2e")] - pub fn menu_submenu(&mut self, selector: &'static str, downs: usize, pick: usize) { + pub fn menu_last_submenu(&mut self, selector: &'static str, pick: usize) { self.click(selector); self.cx.update(|window, cx| window.draw(cx).clear(cx)); - self.keys(&"down ".repeat(downs + 1)); + self.keys("up"); self.keys("right"); self.keys(&format!("{}enter", "down ".repeat(pick))); self.pause(); diff --git a/crates/barsql-ui/src/scenarios/engines.rs b/crates/barsql-ui/src/scenarios/engines.rs index ae55aae..ef903ec 100644 --- a/crates/barsql-ui/src/scenarios/engines.rs +++ b/crates/barsql-ui/src/scenarios/engines.rs @@ -323,7 +323,7 @@ fn server_views(cx: &mut TestAppContext, engine: Engine) { let mut app = open_on(cx, engine); app.connect(); let (tabs, title) = (app.titles().len(), label(&mut app, first)); - app.menu_submenu("schema-options", 2, 0); + app.menu_last_submenu("schema-options", 0); ran_in_new_tab(&mut app, tabs, &title); } diff --git a/crates/barsql-ui/src/scenarios/plans.rs b/crates/barsql-ui/src/scenarios/plans.rs index 7af4a2c..2a9c635 100644 --- a/crates/barsql-ui/src/scenarios/plans.rs +++ b/crates/barsql-ui/src/scenarios/plans.rs @@ -157,11 +157,10 @@ fn a_plan_rows_menu_collapses_and_expands_the_whole_tree(cx: &mut TestAppContext app.connect(); explain(&mut app, "SELECT * FROM plan_t WHERE id IN (SELECT id FROM plan_t WHERE name = 'Bob');"); let before = rows(&mut app).len(); - // Collapse node, Expand all, then Collapse all. - app.context_menu("plan-row-0", 2); + // Row 0 has no children, so Down skips its disabled Collapse node: Expand all, then Collapse all. + app.context_menu("plan-row-0", 1); let collapsed = rows(&mut app); assert!(collapsed.len() < before && collapsed.iter().all(|(key, ..)| !key.contains('.')), "only the top nodes"); - // Expand node, then Expand all. - app.context_menu("plan-row-0", 1); + app.context_menu("plan-row-0", 0); assert_eq!(rows(&mut app).len(), before); } diff --git a/docs/index.html b/docs/index.html index e00e0b7..0553b89 100644 --- a/docs/index.html +++ b/docs/index.html @@ -560,12 +560,12 @@

Windows

macOS

Your system - Apple Silicon .zip - Intel .zip + Disk image .dmg diff --git a/packaging/windows/installer.nsi b/packaging/windows/installer.nsi index 3849ab9..60bf5f7 100644 --- a/packaging/windows/installer.nsi +++ b/packaging/windows/installer.nsi @@ -1,5 +1,6 @@ Unicode true SetCompressor /SOLID lzma +SetCompressorDictSize 64 # Keep the install folder, uninstall key and file classes as they are so upgrades install over the old copy. # The in-app updater also sets DisplayVersion under the uninstall key. diff --git a/scripts/package-linux.sh b/scripts/package-linux.sh index fd9d735..52549e8 100755 --- a/scripts/package-linux.sh +++ b/scripts/package-linux.sh @@ -26,7 +26,7 @@ cp "$out/BarSQL" "$dist/BarSQL" cd "$root_dir" cargo deb -p barsql --no-build --no-strip --output "$dist/BarSQL.deb" -cargo generate-rpm -p crates/barsql --output "$dist/BarSQL.rpm" +cargo generate-rpm -p crates/barsql --payload-compress xz --output "$dist/BarSQL.rpm" if [ -n "${LINUXDEPLOY:-}" ]; then appdir="$out/BarSQL.AppDir" diff --git a/scripts/package-macos.sh b/scripts/package-macos.sh index f5a9afa..7faeb62 100755 --- a/scripts/package-macos.sh +++ b/scripts/package-macos.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Builds a universal BarSQL.app, the updater zips and the dmg in target/package/dist. -# BARSQL_NATIVE_ONLY=1 builds only this Mac's architecture and skips the amd64 zip. +# Builds the updater zips, each with BarSQL.app for one architecture, and the universal dmg in target/package/dist. +# BARSQL_NATIVE_ONLY=1 builds only this Mac's architecture and its zip. set -euo pipefail root_dir="$(cd "$(dirname "$0")/.." && pwd)" @@ -25,33 +25,49 @@ for target in "${targets[@]}"; do binaries+=("$root_dir/target/$target/release/BarSQL") done +make_app() { + local dest="$1" + shift + mkdir -p "$dest/Contents/MacOS" "$dest/Contents/Resources" + lipo -create -output "$dest/Contents/MacOS/BarSQL" "$@" + cp "$root_dir/packaging/macos/icons.icns" "$dest/Contents/Resources/icons.icns" + cp "$root_dir/packaging/macos/Info.plist" "$dest/Contents/Info.plist" + /usr/libexec/PlistBuddy \ + -c "Set :CFBundleShortVersionString $version" \ + -c "Set :CFBundleVersion $version" \ + "$dest/Contents/Info.plist" + codesign --deep --sign - "$dest" +} + rm -rf "$out" -mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources" "$dist" -lipo -create -output "$app/Contents/MacOS/BarSQL" "${binaries[@]}" -cp "$root_dir/packaging/macos/icons.icns" "$app/Contents/Resources/icons.icns" -cp "$root_dir/packaging/macos/Info.plist" "$app/Contents/Info.plist" -/usr/libexec/PlistBuddy \ - -c "Set :CFBundleShortVersionString $version" \ - -c "Set :CFBundleVersion $version" \ - "$app/Contents/Info.plist" -codesign --force --deep --sign - "$app" +mkdir -p "$dist" +make_app "$app" "${binaries[@]}" +# The updater downloads the zip for its own architecture, so each zip carries that one alone. rm -f "$dist"/BarSQL-darwin-*.zip "$dist/BarSQL-macos-universal.dmg" -(cd "$out" && zip -r -y -X "$dist/BarSQL-darwin-arm64.zip" "BarSQL.app" >/dev/null) -if [ "${#targets[@]}" -gt 1 ]; then - cp "$dist/BarSQL-darwin-arm64.zip" "$dist/BarSQL-darwin-amd64.zip" -fi +for binary in "${binaries[@]}"; do + arch="$(lipo -archs "$binary" | sed 's/x86_64/amd64/')" + make_app "$out/$arch/BarSQL.app" "$binary" + (cd "$out/$arch" && zip -r -y -X "$dist/BarSQL-darwin-$arch.zip" "BarSQL.app" >/dev/null) +done # No platform or arch in the dmg name, so the updater never picks it. +dmg="$dist/BarSQL-macos-universal.dmg" staging="$out/dmg" mkdir -p "$staging" ditto "$app" "$staging/BarSQL.app" ln -s /Applications "$staging/Applications" -size_mb=$(($(du -sAm "$staging" | cut -f1) * 2)) + +if [ "$(sw_vers -productVersion | cut -d. -f1)" -ge 27 ]; then + make_dmg=(diskutil image create from --format ULMO --volumeName "BarSQL" "$staging" "$dmg") +else + size_mb=$(($(du -sAm "$staging" | cut -f1) * 2)) + make_dmg=(hdiutil create -size "${size_mb}m" -volname "BarSQL" -srcfolder "$staging" -ov -format ULMO "$dmg") +fi for attempt in 1 2 3; do - hdiutil create -size "${size_mb}m" -volname "BarSQL" -srcfolder "$staging" -ov -format UDZO \ - "$dist/BarSQL-macos-universal.dmg" >/dev/null && break + "${make_dmg[@]}" >/dev/null && break [ "$attempt" = 3 ] && { df -h "$dist" >&2; exit 1; } + rm -f "$dmg" sleep 10 done rm -rf "$staging"