Skip to content

Commit

Permalink
Merge pull request #3237 from weiznich/prepare_v2.0.0-rc.0
Browse files Browse the repository at this point in the history
Prepare v2.0.0 rc.1
  • Loading branch information
weiznich authored Jul 22, 2022
2 parents 56aa9d7 + 1138022 commit 6cfa5f3
Show file tree
Hide file tree
Showing 196 changed files with 4,981 additions and 2,030 deletions.
67 changes: 51 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
rust: ["stable", "beta", "nightly"]
backend: ["postgres", "sqlite", "mysql"]
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
Expand Down Expand Up @@ -153,13 +153,7 @@ jobs:
run: |
choco install sqlite
cd /D C:\ProgramData\chocolatey\lib\SQLite\tools
dir "C:\Program Files\Microsoft Visual Studio"
dir "C:\Program Files\Microsoft Visual Studio\2022"
dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC"
dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary"
dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
lib /machine:x64 /def:sqlite3.def /out:sqlite3.lib
- name: Set variables for sqlite (Windows)
Expand Down Expand Up @@ -324,7 +318,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.54.0
toolchain: 1.56.0
profile: minimal
override: true
- name: Cache cargo registry
Expand Down Expand Up @@ -353,7 +347,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.54.0
toolchain: 1.57.0
profile: minimal
components: clippy, rustfmt
override: true
Expand All @@ -369,6 +363,11 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -y install libsqlite3-dev libpq-dev libmysqlclient-dev
- name: Set environment variables
shell: bash
run: |
echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
echo "RUSTDOCFLAGS=-D warnings" >> $GITHUB_ENV
- name: Remove potential newer clippy.toml from dependencies
run: |
Expand All @@ -377,10 +376,46 @@ jobs:
find ~/.cargo/registry -iname "*clippy.toml" -delete
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all
run: |
cargo clippy --tests --manifest-path diesel_derives/Cargo.toml --features "postgres diesel/postgres"
cargo clippy --tests --manifest-path diesel/Cargo.toml --features "postgres"
cargo clippy --tests --manifest-path diesel_dynamic_schema/Cargo.toml --features "postgres diesel/postgres"
cargo clippy --tests --manifest-path diesel_migrations/migrations_internals/Cargo.toml
cargo clippy --tests --manifest-path diesel_migrations/migrations_macros/Cargo.toml --features "postgres diesel/postgres"
cargo clippy --tests --manifest-path diesel_migrations/Cargo.toml --features "postgres diesel/postgres"
cargo clippy --tests --manifest-path diesel_cli/Cargo.toml --features "postgres" --no-default-features
cargo clippy --tests --manifest-path diesel_tests/Cargo.toml --features "postgres"
cargo clippy --tests --manifest-path examples/postgres/getting_started_step_1/Cargo.toml
cargo clippy --tests --manifest-path examples/postgres/getting_started_step_2/Cargo.toml
cargo clippy --tests --manifest-path examples/postgres/getting_started_step_3/Cargo.toml
cargo clippy --tests --manifest-path examples/postgres/advanced-blog-cli/Cargo.toml
cargo clippy --tests --manifest-path examples/postgres/all_about_inserts/Cargo.toml
cargo clippy --tests --manifest-path examples/postgres/all_about_updates/Cargo.toml
cargo clippy --tests --manifest-path examples/postgres/custom_types/Cargo.toml
cargo clippy --tests --manifest-path diesel_derives/Cargo.toml --features "sqlite diesel/sqlite"
cargo clippy --tests --manifest-path diesel/Cargo.toml --features "sqlite"
cargo clippy --tests --manifest-path diesel_dynamic_schema/Cargo.toml --features "sqlite diesel/sqlite"
cargo clippy --tests --manifest-path diesel_migrations/migrations_macros/Cargo.toml --features "sqlite diesel/sqlite"
cargo clippy --tests --manifest-path diesel_migrations/Cargo.toml --features "sqlite diesel/sqlite"
cargo clippy --tests --manifest-path diesel_cli/Cargo.toml --features "sqlite" --no-default-features
cargo clippy --tests --manifest-path diesel_tests/Cargo.toml --features "sqlite"
cargo clippy --tests --manifest-path examples/sqlite/getting_started_step_1/Cargo.toml
cargo clippy --tests --manifest-path examples/sqlite/getting_started_step_2/Cargo.toml
cargo clippy --tests --manifest-path examples/sqlite/getting_started_step_3/Cargo.toml
cargo clippy --tests --manifest-path examples/sqlite/all_about_inserts/Cargo.toml
cargo clippy --tests --manifest-path diesel_derives/Cargo.toml --features "mysql diesel/mysql"
cargo clippy --tests --manifest-path diesel/Cargo.toml --features "mysql"
cargo clippy --tests --manifest-path diesel_dynamic_schema/Cargo.toml --features "mysql diesel/mysql"
cargo clippy --tests --manifest-path diesel_migrations/migrations_macros/Cargo.toml --features "mysql diesel/mysql"
cargo clippy --tests --manifest-path diesel_migrations/Cargo.toml --features "mysql diesel/mysql"
cargo clippy --tests --manifest-path diesel_cli/Cargo.toml --features "mysql" --no-default-features
cargo clippy --tests --manifest-path diesel_tests/Cargo.toml --features "mysql"
cargo clippy --tests --manifest-path examples/mysql/getting_started_step_1/Cargo.toml
cargo clippy --tests --manifest-path examples/mysql/getting_started_step_2/Cargo.toml
cargo clippy --tests --manifest-path examples/mysql/getting_started_step_3/Cargo.toml
cargo clippy --tests --manifest-path examples/mysql/all_about_inserts/Cargo.toml
- name: Check formating
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -427,13 +462,13 @@ jobs:
run: cargo -Z build-std test --manifest-path diesel/Cargo.toml --no-default-features --features "sqlite extras libsqlite3-sys libsqlite3-sys/bundled libsqlite3-sys/with-asan" --target x86_64-unknown-linux-gnu

minimal_rust_version:
name: Check Minimal supported rust version (1.54.0)
name: Check Minimal supported rust version (1.56.0)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.54.0
toolchain: 1.56.0
profile: minimal
override: true
- name: Cache cargo registry
Expand Down
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,28 @@ default features enabled using some set of dependencies. Those set of dependenci
an up to date version of the specific dependency. We check this by using the unstable `-Z minimal-version` cargo flag.
Increasing the minimal supported Rust version will always be coupled at least with a minor release.

## Unreleased
## [2.0.0 Rc1] 2022-07-19

### Changed

* We've changed the `RunQueryDsl::load_iter` interface to support different
loading modes. This enables us to support more than one strategy for loading
values by iterator from the database.

### Added

* Adds an `ipnet-address` feature flag, allowing support (de)serializing IP
values from the database using types provided by `ipnet`. This feature
may be enabled concurrently with the previously existing `network-address`
feature.
* We've added support for loading values using libpq's row-by-row mode via
the new iterator interface

### Fixed

* Updated `ipnetwork` to allow version 0.20.
* Updated `libsqlite3-sys` to allow version 0.25
* Fix a bug that prevents connection reusing with r2d2

## [2.0.0 Rc0] 2022-04-22

Expand Down Expand Up @@ -109,7 +130,7 @@ Increasing the minimal supported Rust version will always be coupled at least wi

### Changed

* The minimal officially supported rustc version is now 1.54.0
* The minimal officially supported rustc version is now 1.56.0

* Interacting with a database requires a mutable connection.

Expand Down
14 changes: 8 additions & 6 deletions diesel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "diesel"
version = "2.0.0-rc.0"
version = "2.0.0-rc.1"
license = "MIT OR Apache-2.0"
description = "A safe, extensible ORM and Query Builder for PostgreSQL, SQLite, and MySQL"
readme = "README.md"
Expand All @@ -10,21 +10,22 @@ repository = "https://github.com/diesel-rs/diesel"
keywords = ["orm", "database", "sql"]
categories = ["database"]
edition = "2018"
rust-version = "1.54.0"
rust-version = "1.56.0"

[dependencies]
byteorder = { version = "1.0", optional = true }
chrono = { version = "0.4.19", optional = true, default-features = false, features = ["clock", "std"] }
libc = { version = "0.2.0", optional = true }
libsqlite3-sys = { version = ">=0.17.2, <0.25.0", optional = true, features = ["bundled_bindings"] }
libsqlite3-sys = { version = ">=0.17.2, <0.26.0", optional = true, features = ["bundled_bindings"] }
mysqlclient-sys = { version = "0.2.5", optional = true }
pq-sys = { version = "0.4.0", optional = true }
quickcheck = { version = "1.0.3", optional = true }
serde_json = { version = ">=0.8.0, <2.0", optional = true }
url = { version = "2.1.0", optional = true }
percent-encoding = { version = "2.1.0", optional = true }
uuid = { version = ">=0.7.0, <2.0.0", optional = true }
ipnetwork = { version = ">=0.12.2, <0.19.0", optional = true }
ipnetwork = { version = ">=0.12.2, <0.21.0", optional = true }
ipnet = { version = "2.5.0", optional = true }
num-bigint = { version = ">=0.2.0, <0.5.0", optional = true }
num-traits = { version = "0.2.0", optional = true }
num-integer = { version = "0.1.39", optional = true }
Expand All @@ -34,13 +35,13 @@ r2d2 = { version = ">= 0.8.2, < 0.9.0", optional = true }
itoa = { version = "1.0.0", optional = true }

[dependencies.diesel_derives]
version = "~2.0.0-rc.0"
version = "~2.0.0-rc.1"
path = "../diesel_derives"

[dev-dependencies]
cfg-if = "1"
dotenvy = "0.15"
ipnetwork = ">=0.12.2, <0.19.0"
ipnetwork = ">=0.12.2, <0.21.0"
quickcheck = "1.0.3"

[features]
Expand All @@ -58,6 +59,7 @@ mysql = ["mysqlclient-sys", "url", "percent-encoding", "bitflags", "mysql_backen
without-deprecated = ["diesel_derives/without-deprecated"]
with-deprecated = ["diesel_derives/with-deprecated"]
network-address = ["ipnetwork", "libc"]
ipnet-address = ["ipnet", "libc"]
numeric = ["num-bigint", "bigdecimal", "num-traits", "num-integer"]
postgres_backend = ["diesel_derives/postgres", "bitflags", "byteorder", "itoa"]
mysql_backend = ["diesel_derives/mysql", "byteorder"]
Expand Down
Loading

0 comments on commit 6cfa5f3

Please sign in to comment.