From b6cddcd0143f56532f6dc6d3eed14c34d3126aa5 Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Wed, 14 Sep 2022 15:23:06 -0700 Subject: [PATCH] prepare 0.6.2 release (#2092) --- CHANGELOG.md | 84 ++++++++++++++++ Cargo.lock | 10 +- Cargo.toml | 6 +- .../axum-social-with-tests/Cargo.toml | 2 +- gen-changelog.sh | 95 +++++++++++++++++++ sqlx-cli/Cargo.toml | 4 +- sqlx-core/Cargo.toml | 6 +- sqlx-macros/Cargo.toml | 6 +- sqlx-rt/Cargo.toml | 2 +- 9 files changed, 197 insertions(+), 18 deletions(-) create mode 100755 gen-changelog.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 41ad71412b..98382a5175 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,72 @@ 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.6.2 - 2022-09-14 + +[25 pull requests][0.6.2-prs] were merged this release cycle. + +### Added +* [[#1081]]: Add `try_from` attribute for `FromRow` derive [[@zzhengzhuo]] + * Exemplifies "out of sight, out of mind." It's surprisingly easy to forget about PRs when they get pushed onto + the second page. We'll be sure to clean out the backlog for 0.7.0. +* [[#2014]]: Support additional SQLCipher options in SQLite driver. [[@szymek156]] +* [[#2052]]: Add issue templates [[@abonander]] +* [[#2053]]: Add documentation for `IpAddr` support in Postgres [[@rakshith-ravi]] +* [[#2062]]: Add extension support for SQLite [[@bradfier]] +* [[#2063]]: customizable db locking during migration [[@fuzzbuck]] + +### Changed +* [[#2025]]: Bump sqlformat to 2.0 [[@NSMustache]] +* [[#2056]]: chore: Switch to sha1 crate [[@stoically]] +* [[#2071]]: Use cargo check consistently in `prepare` [[@cycraig]] + +### Fixed +* [[#1991]]: Ensure migration progress is not lost for Postgres, MySQL and SQLite. [[@crepererum]] +* [[#2023]]: Fix expansion of `#[sqlx(flatten)]` for `FromRow` derive [[@RustyYato]] +* [[#2028]]: Use fully qualified path when forwarding to `#[test]` from `#[sqlx::test]` [[@alexander-jackson]] +* [[#2040]]: Fix typo in `FromRow` docs [[@zlidner]] +* [[#2046]]: added flag for PIPES_AS_CONCAT connection setting for MySQL to fix #2034 [[@marcustut]] +* [[#2055]]: Use unlock notify also on `sqlite3_exec` [[@madadam]] +* [[#2057]]: Make begin,commit,rollback cancel-safe in sqlite [[@madadam]] +* [[#2058]]: fix typo in documentation [[@lovasoa]] +* [[#2067]]: fix(docs): close code block in query_builder.rs [[@abonander]] +* [[#2069]]: Fix `prepare` race condition in workspaces [[@cycraig]] +* [[#2072]]: SqliteConnectOptions typo [[@fasterthanlime]] +* [[#2074]]: fix: mssql uses unsigned for tinyint instead of signed [[@he4d]] +* [[#2081]]: close unnamed portal after each executed extended query [[@DXist]] +* [[#2086]]: PgHasArrayType for transparent types fix. [[@Wopple]] + * NOTE: this is a breaking change and has been postponed to 0.7.0. +* [[#2089]]: fix: Remove default chrono dep on time for sqlx-cli [[@TravisWhitehead]] +* [[#2091]]: Sqlite explain plan log efficiency [[@tyrelr]] + +[0.6.2-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Aclosed+merged%3A2022-08-04..2022-09-14+ + +[#1081]: https://github.com/launchbadge/sqlx/pull/1081 +[#1991]: https://github.com/launchbadge/sqlx/pull/1991 +[#2014]: https://github.com/launchbadge/sqlx/pull/2014 +[#2023]: https://github.com/launchbadge/sqlx/pull/2023 +[#2025]: https://github.com/launchbadge/sqlx/pull/2025 +[#2028]: https://github.com/launchbadge/sqlx/pull/2028 +[#2040]: https://github.com/launchbadge/sqlx/pull/2040 +[#2046]: https://github.com/launchbadge/sqlx/pull/2046 +[#2052]: https://github.com/launchbadge/sqlx/pull/2052 +[#2053]: https://github.com/launchbadge/sqlx/pull/2053 +[#2055]: https://github.com/launchbadge/sqlx/pull/2055 +[#2056]: https://github.com/launchbadge/sqlx/pull/2056 +[#2057]: https://github.com/launchbadge/sqlx/pull/2057 +[#2058]: https://github.com/launchbadge/sqlx/pull/2058 +[#2062]: https://github.com/launchbadge/sqlx/pull/2062 +[#2063]: https://github.com/launchbadge/sqlx/pull/2063 +[#2067]: https://github.com/launchbadge/sqlx/pull/2067 +[#2069]: https://github.com/launchbadge/sqlx/pull/2069 +[#2071]: https://github.com/launchbadge/sqlx/pull/2071 +[#2072]: https://github.com/launchbadge/sqlx/pull/2072 +[#2074]: https://github.com/launchbadge/sqlx/pull/2074 +[#2081]: https://github.com/launchbadge/sqlx/pull/2081 +[#2086]: https://github.com/launchbadge/sqlx/pull/2086 +[#2089]: https://github.com/launchbadge/sqlx/pull/2089 +[#2091]: https://github.com/launchbadge/sqlx/pull/2091 + ## 0.6.1 - 2022-08-02 [33 pull requests][0.6.1-prs] were merged this release cycle. @@ -1510,3 +1576,21 @@ Fix docs.rs build by enabling a runtime feature in the docs.rs metadata in `Carg [@crepererum]: https://github.com/crepererum [@UramnOIL]: https://github.com/UramnOIL [@liningpan]: https://github.com/liningpan +[@zzhengzhuo]: https://github.com/zzhengzhuo +[@crepererum]: https://github.com/crepererum +[@szymek156]: https://github.com/szymek156 +[@NSMustache]: https://github.com/NSMustache +[@RustyYato]: https://github.com/RustyYato +[@alexander-jackson]: https://github.com/alexander-jackson +[@zlidner]: https://github.com/zlidner +[@zlindner]: https://github.com/zlindner +[@marcustut]: https://github.com/marcustut +[@rakshith-ravi]: https://github.com/rakshith-ravi +[@bradfier]: https://github.com/bradfier +[@fuzzbuck]: https://github.com/fuzzbuck +[@cycraig]: https://github.com/cycraig +[@fasterthanlime]: https://github.com/fasterthanlime +[@he4d]: https://github.com/he4d +[@DXist]: https://github.com/DXist +[@Wopple]: https://github.com/Wopple +[@TravisWhitehead]: https://github.com/TravisWhitehead diff --git a/Cargo.lock b/Cargo.lock index f6d392fc1b..6a91e65375 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2715,7 +2715,7 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.6.1" +version = "0.6.2" dependencies = [ "anyhow", "async-std", @@ -2754,7 +2754,7 @@ dependencies = [ [[package]] name = "sqlx-cli" -version = "0.6.1" +version = "0.6.2" dependencies = [ "anyhow", "async-trait", @@ -2779,7 +2779,7 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.6.1" +version = "0.6.2" dependencies = [ "ahash", "atoi", @@ -2941,7 +2941,7 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.6.1" +version = "0.6.2" dependencies = [ "dotenvy", "either", @@ -2961,7 +2961,7 @@ dependencies = [ [[package]] name = "sqlx-rt" -version = "0.6.1" +version = "0.6.2" dependencies = [ "async-native-tls", "async-std", diff --git a/Cargo.toml b/Cargo.toml index 8ea9cafe60..78e91bd14d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ members = [ [package] name = "sqlx" -version = "0.6.1" +version = "0.6.2" license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/launchbadge/sqlx" @@ -125,8 +125,8 @@ bstr = ["sqlx-core/bstr"] git2 = ["sqlx-core/git2"] [dependencies] -sqlx-core = { version = "0.6.1", path = "sqlx-core", default-features = false } -sqlx-macros = { version = "0.6.1", path = "sqlx-macros", default-features = false, optional = true } +sqlx-core = { version = "0.6.2", path = "sqlx-core", default-features = false } +sqlx-macros = { version = "0.6.2", path = "sqlx-macros", default-features = false, optional = true } [dev-dependencies] anyhow = "1.0.52" diff --git a/examples/postgres/axum-social-with-tests/Cargo.toml b/examples/postgres/axum-social-with-tests/Cargo.toml index 3754ece9c8..509cda2024 100644 --- a/examples/postgres/axum-social-with-tests/Cargo.toml +++ b/examples/postgres/axum-social-with-tests/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] # Primary crates axum = { version = "0.5.13", features = ["macros"] } -sqlx = { version = "0.6.1", path = "../../../", features = ["runtime-tokio-rustls", "postgres", "time", "uuid"] } +sqlx = { version = "0.6.2", path = "../../../", features = ["runtime-tokio-rustls", "postgres", "time", "uuid"] } tokio = { version = "1.20.1", features = ["rt-multi-thread", "macros"] } # Important secondary crates diff --git a/gen-changelog.sh b/gen-changelog.sh new file mode 100755 index 0000000000..4df4b9baae --- /dev/null +++ b/gen-changelog.sh @@ -0,0 +1,95 @@ +# Requires Github CLI and `jq` +# Usage: `./gen-changelog.sh YYYY-mm-dd` +# Generates changelog entries for all PRs merged on or after the given date. +set -e + +PULLS='[]' +CURSOR='null' + +VERSION=$1 + +MIN_MERGED_AT=$(date --date="$1" +%s) + +while true +do + # Use the GraphQL API to paginate merged pull requests. + # The REST API doesn't allow filtering only merged pull requests. + # We scan all merged pull requests from the beginning because it's not unheard of to have a very old PR finally get + # merged; e.g. #1081, merged a year and a half after it was opened. + if [ "$CURSOR" != "null" ]; + then + PAGE=$(gh api graphql -f after="$CURSOR" -f query='query($after: String) { + repository(owner: "launchbadge", name: "sqlx") { + pullRequests(first:100,orderBy: {field:CREATED_AT, direction:ASC},states:MERGED, after: $after) { + nodes { + number + author { login } + title + url + mergedAt + } + pageInfo { + hasNextPage + endCursor + } + } + } + }'); + else + PAGE=$(gh api graphql -f query='query { + repository(owner: "launchbadge", name: "sqlx") { + pullRequests(first:100,orderBy: {field:CREATED_AT, direction:ASC},states:MERGED) { + nodes { + number + author { login } + title + url + mergedAt + } + pageInfo { + hasNextPage + endCursor + } + } + } + }'); + fi + + CURSOR=$(echo "$PAGE" | jq -r '.data.repository.pullRequests.pageInfo.endCursor'); + + HAS_NEXT_PAGE=$(echo "$PAGE" | jq '.data.repository.pullRequests.pageInfo.hasNextPage'); + + PULLS=$(echo "$PAGE" | jq "$PULLS + (.data.repository.pullRequests.nodes | map(select(.mergedAt | fromdate >= $MIN_MERGED_AT)))"); + + # can't use `"$CURSOR" == 'null'` because the last page still gives a valid cursor + if ! $HAS_NEXT_PAGE; then break; fi; +done + +COUNT=$(echo "$PULLS" | jq "length"); + +echo "Found $COUNT pull requests merged on or after $1\n" + +if [ -z $COUNT ]; then exit 0; fi; + +echo "Entries:" +echo "$PULLS" | jq -r 'map("* [[#\(.number)]]: \(.title) [[@\(.author.login)]]") | join("\n")' + +echo "\nLinks:" +echo "$PULLS" | jq -r 'map("[#\(.number)]: \(.url)") | join("\n")' + +echo "\nNew Authors:" +DUPE_AUTHORS='' + +# Generate link entries for new authors at the end of the changelog. +echo "$PULLS" | jq -r '.[].author.login' | while read author; do + author_url="https://github.com/$author" + author_entry="[@$author]: $author_url" + + # Check if the entry already exists in the changelog or in our list of new authors. + if grep -qF "$author_entry" CHANGELOG.md || echo "$DUPE_AUTHORS" | grep -qF "$author_entry"; + then continue; + fi; + + DUPE_AUTHORS="$DUPE_AUTHORS$author_entry\n" + echo $author_entry +done diff --git a/sqlx-cli/Cargo.toml b/sqlx-cli/Cargo.toml index 239c73b54f..f0e8eb8a45 100644 --- a/sqlx-cli/Cargo.toml +++ b/sqlx-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlx-cli" -version = "0.6.1" +version = "0.6.2" description = "Command-line utility for SQLx, the Rust SQL toolkit." edition = "2021" readme = "README.md" @@ -27,7 +27,7 @@ path = "src/bin/cargo-sqlx.rs" [dependencies] dotenvy = "0.15.0" tokio = { version = "1.15.0", features = ["macros", "rt", "rt-multi-thread"] } -sqlx = { version = "0.6.1", path = "..", default-features = false, features = [ +sqlx = { version = "0.6.2", path = "..", default-features = false, features = [ "migrate", "any", "offline", diff --git a/sqlx-core/Cargo.toml b/sqlx-core/Cargo.toml index 6af7fe11cf..70f93ef4ae 100644 --- a/sqlx-core/Cargo.toml +++ b/sqlx-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlx-core" -version = "0.6.1" +version = "0.6.2" 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" @@ -106,7 +106,7 @@ offline = ["serde", "either/serde"] paste = "1.0.6" ahash = "0.7.6" atoi = "1.0" -sqlx-rt = { path = "../sqlx-rt", version = "0.6.1" } +sqlx-rt = { path = "../sqlx-rt", version = "0.6.2" } base64 = { version = "0.13.0", default-features = false, optional = true, features = ["std"] } bigdecimal_ = { version = "0.3.0", optional = true, package = "bigdecimal" } rust_decimal = { version = "1.19.0", optional = true } @@ -178,5 +178,5 @@ event-listener = "2.5.2" dotenvy = "0.15" [dev-dependencies] -sqlx = { version = "0.6.1", path = "..", features = ["postgres", "sqlite", "mysql"] } +sqlx = { version = "0.6.2", path = "..", features = ["postgres", "sqlite", "mysql"] } tokio = { version = "1", features = ["rt"] } diff --git a/sqlx-macros/Cargo.toml b/sqlx-macros/Cargo.toml index 26711667df..14ecbc7735 100644 --- a/sqlx-macros/Cargo.toml +++ b/sqlx-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlx-macros" -version = "0.6.1" +version = "0.6.2" 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" @@ -75,8 +75,8 @@ heck = { version = "0.4", features = ["unicode"] } either = "1.6.1" once_cell = "1.9.0" proc-macro2 = { version = "1.0.36", default-features = false } -sqlx-core = { version = "0.6.1", default-features = false, features = ["any"], path = "../sqlx-core" } -sqlx-rt = { version = "0.6.1", default-features = false, path = "../sqlx-rt" } +sqlx-core = { version = "0.6.2", default-features = false, features = ["any"], path = "../sqlx-core" } +sqlx-rt = { version = "0.6.2", default-features = false, path = "../sqlx-rt" } serde = { version = "1.0.132", features = ["derive"], optional = true } serde_json = { version = "1.0.73", optional = true } sha2 = { version = "0.10.0", optional = true } diff --git a/sqlx-rt/Cargo.toml b/sqlx-rt/Cargo.toml index fb9ecd5f14..5db022a190 100644 --- a/sqlx-rt/Cargo.toml +++ b/sqlx-rt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlx-rt" -version = "0.6.1" +version = "0.6.2" 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."