diff --git a/CHANGELOG.md b/CHANGELOG.md index 615ac3e31..d896fee01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,77 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.5.11 - 2021-02-17 +[20 pull requests][0.5.11-prs] were merged this release cycle. + +### Added +* [[#1610]]: Allow converting `AnyConnectOptions` to a specific `ConnectOptions` [[@05storm26]] +* [[#1652]]: Implement `From` for `AnyConnection` [[@genusistimelord]] +* [[#1658]]: Handle `SQLITE_LOCKED` [[@madadam]] +* [[#1665]]: Document offline mode usage with feature flags [[@sedrik]] +* [[#1680]]: Show checksum mismatches in `sqlx migrate info` [[@ifn3]] +* [[#1685]]: Add tip for setting `opt-level` for `sqlx-macros` [[@LovecraftianHorror]] +* [[#1687]]: Docs: `Acquire` examples and alternative [[@stoically]] +* [[#1696]]: Postgres: support for `ltree` [[@cemoktra]] +* [[#1710]]: Postgres: support for `lquery` [[@cemoktra]] + +### Changed +* [[#1605]]: Remove unused dependencies [[@paolobarbolini]] +* [[#1606]]: Add target context to Postgres `NOTICE` logs [[@dbeckwith]] +* [[#1684]]: Macros: Cache parsed `sqlx-data.json` instead of reparsing [[@LovecraftianHorror]] + +### Fixed +* [[#1608]]: Drop worker shared state in shutdown (SQLite) [[@andrewwhitehead]] +* [[#1619]]: Docs(macros): remove sentences banning usage of `as _` [[@k-jun]] +* [[#1626]]: Simplify `cargo-sqlx` command-line definition [[@tranzystorek-io]] +* [[#1636]]: Fix and extend Postgres transaction example [[@taladar]] +* [[#1657]]: Fix typo in macro docs [[@p9s]] +* [[#1661]]: Fix binding `Option` for `Any` driver [[@ArGGu]] +* [[#1667]]: MySQL: Avoid panicking if packet is empty [[@nappa85]] +* [[#1692]]: Postgres: Fix power calculation when encoding `BigDecimal` into `NUMERIC` [[@VersBinarii]] + +Additionally, we have introduced two mitigations for [the issue of the cyclic dependency on `ahash`][aHash#95]: + +* We re-downgraded our version requirement on `indexmap` from `1.7.0` back to `1.6.2` so users can pin it to that + version [as recommended in aHash#95][ahash-fix]. + * [This was regressed accidentally during a sweeping dependency upgrade before the last release][indexmap-regression], + sorry about that. +* Thanks to the work of [@LovecraftianHorror] in [#1684], we no longer require the `preserve_order` feature of + `serde_json` which gives users another place to break the cycle by simply not enabling that feature. + * This may introduce extra churn in Git diffs for `sqlx-data.json`, however. If this is an issue for you but + the dependency cycle isn't, you can re-enable the `preserve_order` feature: + ```toml + [dependencies] + serde_json = { version = "1", features = ["preserve_order"] } + ``` + +[aHash#95]: https://github.com/tkaitchuck/aHash/issues/95 +[ahash-fix]: https://github.com/tkaitchuck/aHash/issues/95#issuecomment-874150078 +[indexmap-regression]: https://github.com/launchbadge/sqlx/pull/1603#issuecomment-1010827637 + +[#1605]: https://github.com/launchbadge/sqlx/pull/1605 +[#1606]: https://github.com/launchbadge/sqlx/pull/1606 +[#1608]: https://github.com/launchbadge/sqlx/pull/1608 +[#1610]: https://github.com/launchbadge/sqlx/pull/1610 +[#1619]: https://github.com/launchbadge/sqlx/pull/1619 +[#1626]: https://github.com/launchbadge/sqlx/pull/1626 +[#1636]: https://github.com/launchbadge/sqlx/pull/1636 +[#1652]: https://github.com/launchbadge/sqlx/pull/1652 +[#1657]: https://github.com/launchbadge/sqlx/pull/1657 +[#1658]: https://github.com/launchbadge/sqlx/pull/1658 +[#1661]: https://github.com/launchbadge/sqlx/pull/1661 +[#1665]: https://github.com/launchbadge/sqlx/pull/1665 +[#1667]: https://github.com/launchbadge/sqlx/pull/1667 +[#1680]: https://github.com/launchbadge/sqlx/pull/1680 +[#1684]: https://github.com/launchbadge/sqlx/pull/1684 +[#1685]: https://github.com/launchbadge/sqlx/pull/1685 +[#1687]: https://github.com/launchbadge/sqlx/pull/1687 +[#1692]: https://github.com/launchbadge/sqlx/pull/1692 +[#1696]: https://github.com/launchbadge/sqlx/pull/1696 +[#1710]: https://github.com/launchbadge/sqlx/pull/1710 + +[0.5.11-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Amerged+merged%3A2021-12-30..2022-02-17 + ## 0.5.10 - 2021-12-29 [A whopping 31 pull requests][0.5.10-prs] were merged this release cycle! @@ -1093,4 +1164,18 @@ Fix docs.rs build by enabling a runtime feature in the docs.rs metadata in `Carg [@SonicZentropy]: https://github.com/SonicZentropy [@parazyd]: https://github.com/parazyd [@kunjee17]: https://github.com/kunjee17 -[@05storm26]: https://github.com/05storm26 \ No newline at end of file +[@05storm26]: https://github.com/05storm26 +[@dbeckwith]: https://github.com/dbeckwith +[@k-jun]: https://github.com/k-jun +[@tranzystorek-io]: https://github.com/tranzystorek-io +[@taladar]: https://github.com/taladar +[@genusistimelord]: https://github.com/genusistimelord +[@p9s]: https://github.com/p9s +[@ArGGu]: https://github.com/ArGGu +[@sedrik]: https://github.com/sedrik +[@nappa85]: https://github.com/nappa85 +[@ifn3]: https://github.com/ifn3 +[@LovecraftianHorror]: https://github.com/LovecraftianHorror +[@stoically]: https://github.com/stoically +[@VersBinarii]: https://github.com/VersBinarii +[@cemoktra]: https://github.com/cemoktra \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index c77bdd350..25c2d1370 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -425,9 +425,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.0.7" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12e8611f9ae4e068fa3e56931fded356ff745e70987ff76924a6e0ab1c8ef2e3" +checksum = "e5f1fea81f183005ced9e59cdb01737ef2423956dac5a6d731b06b2ecfaa3467" dependencies = [ "atty", "bitflags", @@ -442,9 +442,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.0.6" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "517358c28fcef6607bf6f76108e02afad7e82297d132a6b846dcc1fc3efcd153" +checksum = "5fd1122e63869df2cb309f449da1ad54a7c6dfeb7c7e6ccd8e0825d9eb93bb72" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -2235,7 +2235,6 @@ version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcbd0344bc6533bc7ec56df11d42fb70f1b912351c0825ccb7211b59d8af7cf5" dependencies = [ - "indexmap", "itoa 1.0.1", "ryu", "serde", @@ -2351,7 +2350,7 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.5.10" +version = "0.5.11" dependencies = [ "anyhow", "async-std", @@ -2387,12 +2386,12 @@ dependencies = [ [[package]] name = "sqlx-cli" -version = "0.5.10" +version = "0.5.11" dependencies = [ "anyhow", "async-trait", "chrono", - "clap 3.0.7", + "clap 3.1.0", "console", "dotenv", "futures", @@ -2409,7 +2408,7 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.5.10" +version = "0.5.11" dependencies = [ "ahash", "atoi", @@ -2547,7 +2546,7 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.5.10" +version = "0.5.11" dependencies = [ "dotenv", "either", @@ -2567,7 +2566,7 @@ dependencies = [ [[package]] name = "sqlx-rt" -version = "0.5.10" +version = "0.5.11" dependencies = [ "actix-rt", "async-native-tls", diff --git a/Cargo.toml b/Cargo.toml index 7a2ea8ae2..bb8da5c21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ members = [ [package] name = "sqlx" -version = "0.5.10" +version = "0.5.11" license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/launchbadge/sqlx" @@ -132,8 +132,8 @@ bstr = ["sqlx-core/bstr"] git2 = ["sqlx-core/git2"] [dependencies] -sqlx-core = { version = "0.5.10", path = "sqlx-core", default-features = false } -sqlx-macros = { version = "0.5.10", path = "sqlx-macros", default-features = false, optional = true } +sqlx-core = { version = "0.5.11", path = "sqlx-core", default-features = false } +sqlx-macros = { version = "0.5.11", path = "sqlx-macros", default-features = false, optional = true } [dev-dependencies] anyhow = "1.0.52" diff --git a/sqlx-cli/Cargo.toml b/sqlx-cli/Cargo.toml index 6ae06db07..0a4be6b95 100644 --- a/sqlx-cli/Cargo.toml +++ b/sqlx-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlx-cli" -version = "0.5.10" +version = "0.5.11" description = "Command-line utility for SQLx, the Rust SQL toolkit." edition = "2018" readme = "README.md" @@ -27,13 +27,13 @@ path = "src/bin/cargo-sqlx.rs" [dependencies] dotenv = "0.15.0" tokio = { version = "1.15.0", features = ["macros", "rt", "rt-multi-thread"] } -sqlx = { version = "0.5.10", path = "..", default-features = false, features = [ +sqlx = { version = "0.5.11", path = "..", default-features = false, features = [ "migrate", "any", "offline", ] } futures = "0.3.19" -clap = { version = "3.0", features = ["derive", "env"] } +clap = { version = "3.1.0", features = ["derive", "env"] } chrono = "0.4.19" anyhow = "1.0.52" url = { version = "2.2.2", default-features = false } diff --git a/sqlx-core/Cargo.toml b/sqlx-core/Cargo.toml index 8284e2b26..1aec06134 100644 --- a/sqlx-core/Cargo.toml +++ b/sqlx-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlx-core" -version = "0.5.10" +version = "0.5.11" repository = "https://github.com/launchbadge/sqlx" description = "Core of SQLx, the rust SQL toolkit. Not intended to be used directly." license = "MIT OR Apache-2.0" @@ -102,7 +102,7 @@ offline = ["serde", "either/serde"] paste = "1.0.6" ahash = "0.7.6" atoi = "0.4.0" -sqlx-rt = { path = "../sqlx-rt", version = "0.5.10"} +sqlx-rt = { path = "../sqlx-rt", version = "0.5.11"} base64 = { version = "0.13.0", default-features = false, optional = true, features = ["std"] } bigdecimal_ = { version = "0.2.2", optional = true, package = "bigdecimal" } rust_decimal = { version = "1.19.0", optional = true } @@ -165,7 +165,9 @@ stringprep = "0.1.2" bstr = { version = "0.2.17", default-features = false, features = ["std"], optional = true } git2 = { version = "0.13.25", default-features = false, optional = true } hashlink = "0.7.0" -indexmap = "1.7.0" +# NOTE: *must* remain below 1.7.0 to allow users to avoid the `ahash` cyclic dependency problem by pinning the version +# https://github.com/tkaitchuck/aHash/issues/95#issuecomment-874150078 +indexmap = "1.6.0" [dev-dependencies] -sqlx = { version = "0.5.10", path = "..", features = ["postgres", "sqlite"] } \ No newline at end of file +sqlx = { version = "0.5.11", path = "..", features = ["postgres", "sqlite"] } diff --git a/sqlx-macros/Cargo.toml b/sqlx-macros/Cargo.toml index b036aa2f4..98ae6ad20 100644 --- a/sqlx-macros/Cargo.toml +++ b/sqlx-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlx-macros" -version = "0.5.10" +version = "0.5.11" repository = "https://github.com/launchbadge/sqlx" description = "Macros for SQLx, the rust SQL toolkit. Not intended to be used directly." license = "MIT OR Apache-2.0" @@ -84,10 +84,10 @@ heck = "0.3.3" either = "1.6.1" once_cell = "1.9.0" proc-macro2 = { version = "1.0.36", default-features = false } -sqlx-core = { version = "0.5.10", default-features = false, path = "../sqlx-core" } -sqlx-rt = { version = "0.5.10", default-features = false, path = "../sqlx-rt" } +sqlx-core = { version = "0.5.11", default-features = false, path = "../sqlx-core" } +sqlx-rt = { version = "0.5.11", default-features = false, path = "../sqlx-rt" } serde = { version = "1.0.132", features = ["derive"], optional = true } -serde_json = { version = "1.0.73", features = ["preserve_order"], optional = true } +serde_json = { version = "1.0.73", optional = true } sha2 = { version = "0.9.8", optional = true } syn = { version = "1.0.84", default-features = false, features = ["full"] } quote = { version = "1.0.14", default-features = false } diff --git a/sqlx-rt/Cargo.toml b/sqlx-rt/Cargo.toml index 5cd68baf7..51f478ac3 100644 --- a/sqlx-rt/Cargo.toml +++ b/sqlx-rt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlx-rt" -version = "0.5.10" +version = "0.5.11" repository = "https://github.com/launchbadge/sqlx" license = "MIT OR Apache-2.0" description = "Runtime abstraction used by SQLx, the Rust SQL toolkit. Not intended to be used directly."