Skip to content

Commit a74aeeb

Browse files
committed
Merged master
Signed-off-by: chandr-andr (Kiselev Aleksandr) <chandr@chandr.net>
2 parents a9a9c82 + bbfdfdd commit a74aeeb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1231
-159
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
33
# Include lld linker to improve build times either by using environment variable
44
# RUSTFLAGS="-C link-arg=-fuse-ld=lld" or with Cargo's configuration file (i.e see .cargo/config.toml).
55
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
6-
&& apt-get -y install clang lld libsqlite3-dev libmariadb-dev-compat libmariadb-dev libpq-dev pkg-config \
6+
&& apt-get -y install clang lld libsqlite3-dev libmariadb-dev-compat libmariadb-dev libpq-dev pkg-config gh \
77
&& apt-get autoremove -y && apt-get clean -y
88

99
USER vscode
1010

11-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.75 --no-modify-path -y
11+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.79 --no-modify-path -y
1212

1313
RUN /home/vscode/.cargo/bin/cargo install cargo-release
14-
RUN /home/vscode/.cargo/bin/cargo install --locked cargo-outdated
14+
RUN /home/vscode/.cargo/bin/cargo install --locked cargo-outdated

.github/workflows/ci.yml

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: CI
22

33
on:
44
push:
5-
branches: ["master"]
6-
tags: ["deadpool-*"]
5+
branches: [ "master" ]
6+
tags: [ "deadpool-*" ]
77
pull_request:
8-
branches: ["master"]
8+
branches: [ "master" ]
99

1010
env:
1111
RUST_BACKTRACE: 1
@@ -87,8 +87,8 @@ jobs:
8787
toolchain: stable
8888

8989
- run: cargo check -p deadpool
90-
--no-default-features
91-
--features ${{ matrix.feature1 }},${{ matrix.feature2 }}
90+
--no-default-features
91+
--features ${{ matrix.feature1 }},${{ matrix.feature2 }}
9292

9393
check-integration:
9494
name: Check integration
@@ -105,7 +105,7 @@ jobs:
105105
- rt_tokio_1
106106
- rt_async-std_1
107107
- serde
108-
include: # additional inclusions for matrix
108+
include: # additional inclusions for matrix
109109
- crate: diesel
110110
feature: mysql
111111
- crate: diesel
@@ -123,7 +123,31 @@ jobs:
123123
# We don't use `--no-default-features` here as integration crates don't
124124
# work with it at all.
125125
- run: cargo check -p deadpool-${{ matrix.crate }}
126-
--features ${{ matrix.feature }}
126+
--features ${{ matrix.feature }}
127+
128+
check-integration-wasm:
129+
name: Check integration (WebAssembly)
130+
strategy:
131+
fail-fast: false
132+
matrix:
133+
crate:
134+
- postgres
135+
feature:
136+
- --features rt_tokio_1
137+
- --features serde --features rt_tokio_1
138+
runs-on: ubuntu-latest
139+
steps:
140+
- uses: actions/checkout@v3
141+
- uses: actions-rs/toolchain@v1
142+
with:
143+
profile: minimal
144+
toolchain: stable
145+
target: wasm32-unknown-unknown
146+
147+
- run: cargo check -p deadpool-${{ matrix.crate }}
148+
--no-default-features
149+
${{ matrix.feature }}
150+
--target wasm32-unknown-unknown
127151

128152
msrv:
129153
name: MSRV
@@ -134,11 +158,12 @@ jobs:
134158
- { crate: deadpool-runtime, msrv: '1.75.0' }
135159
- { crate: deadpool-sync, msrv: '1.75.0' }
136160
- { crate: deadpool, msrv: '1.75.0' }
137-
- { crate: deadpool-diesel, msrv: '1.75.0' }
161+
# Disable Diesel MSRV check as it keeps failing for no obvious reason.
162+
#- { crate: deadpool-diesel, msrv: '1.78.0' }
138163
- { crate: deadpool-lapin, msrv: '1.75.0' }
139164
- { crate: deadpool-postgres, msrv: '1.75.0' }
140165
- { crate: deadpool-redis, msrv: '1.75.0' }
141-
- { crate: deadpool-sqlite, msrv: '1.75.0' }
166+
- { crate: deadpool-sqlite, msrv: '1.77.0' }
142167
runs-on: ubuntu-latest
143168
steps:
144169
- uses: actions/checkout@v3
@@ -185,6 +210,12 @@ jobs:
185210
--health-interval 10s
186211
--health-timeout 5s
187212
--health-retries 5
213+
redis-sentinel:
214+
image: 'bitnami/redis-sentinel:latest'
215+
env:
216+
ALLOW_EMPTY_PASSWORD: yes
217+
ports:
218+
- 26379:26379
188219
redis:
189220
image: redis:7.0-alpine
190221
ports:
@@ -216,6 +247,9 @@ jobs:
216247
PG__PASSWORD: deadpool
217248
PG__DBNAME: deadpool
218249
REDIS__URL: redis://127.0.0.1/
250+
REDIS_SENTINEL__URLS: redis://127.0.0.1:26379
251+
REDIS_SENTINEL__SERVER_TYPE: "master"
252+
REDIS_SENTINEL__MASTER_NAME: "mymaster"
219253
REDIS_CLUSTER__URLS: redis://127.0.0.1:7000,redis://127.0.0.1:7001
220254
AMQP__URL: amqp://deadpool:deadpool@127.0.0.1/deadpool
221255

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
## [0.12.1] - 2024-05-07
13+
14+
- Add WASM support
15+
16+
## [0.12.0] - 2024-05-04
17+
18+
- Add `Send` to `Manager::Type` and `Manager::Error` associated types
19+
- Add `Send` to `Manager::create` and `Manager::recycle` return types
20+
1221
## [0.11.2] - 2024-04-10
1322

1423
- Make `Timeouts::new` and `Timeouts::wait_millis` functions const fns
@@ -185,7 +194,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
185194
- First release
186195

187196
<!-- next-url -->
188-
[Unreleased]: https://github.com/bikeshedder/deadpool/compare/deadpool-v0.11.2...HEAD
197+
[Unreleased]: https://github.com/bikeshedder/deadpool/compare/deadpool-v0.12.1...HEAD
198+
[0.12.1]: https://github.com/bikeshedder/deadpool/compare/deadpool-v0.12.0...deadpool-v0.12.1
199+
[0.12.0]: https://github.com/bikeshedder/deadpool/compare/deadpool-v0.11.2...deadpool-v0.12.0
189200
[0.11.2]: https://github.com/bikeshedder/deadpool/compare/deadpool-v0.11.1...deadpool-v0.11.2
190201
[0.11.1]: https://github.com/bikeshedder/deadpool/compare/deadpool-v0.11.0...deadpool-v0.11.1
191202
[0.11.0]: https://github.com/bikeshedder/deadpool/compare/deadpool-v0.10.0...deadpool-v0.11.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "deadpool"
3-
version = "0.11.2"
3+
version = "0.12.1"
44
edition = "2021"
55
rust-version = "1.75"
66
authors = ["Michael P. Jung <michael.jung@terreon.de>"]

diesel/CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
- Fix deprecation warning introduced in diesel `2.2.0`
13+
- Update `diesel` dependency to version `2.2.0`
14+
- Bump up MSRV to `1.78`
15+
16+
## [0.6.1] - 2024-05-04
17+
18+
- Update `deadpool` dependency to version `0.12`
19+
1220
## [0.6.0] - 2024-04-01
1321

1422
- Update `deadpool` dependency to version `0.11`
@@ -63,7 +71,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6371
- First release
6472

6573
<!-- next-url -->
66-
[Unreleased]: https://github.com/bikeshedder/deadpool/compare/deadpool-diesel-v0.6.0...HEAD
74+
[Unreleased]: https://github.com/bikeshedder/deadpool/compare/deadpool-diesel-v0.6.1...HEAD
75+
[0.6.1]: https://github.com/bikeshedder/deadpool/compare/deadpool-diesel-v0.6.0...deadpool-diesel-v0.6.1
6776
[0.6.0]: https://github.com/bikeshedder/deadpool/compare/deadpool-diesel-v0.5.0...deadpool-diesel-v0.6.0
6877
[0.5.0]: https://github.com/bikeshedder/deadpool/compare/deadpool-diesel-v0.4.1...deadpool-diesel-v0.5.0
6978
[0.4.1]: https://github.com/bikeshedder/deadpool/compare/deadpool-diesel-v0.4.0...deadpool-diesel-v0.4.1

diesel/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "deadpool-diesel"
3-
version = "0.6.0"
3+
version = "0.6.1"
44
edition = "2021"
5-
rust-version = "1.75"
5+
rust-version = "1.78"
66
authors = ["Michael P. Jung <michael.jung@terreon.de>"]
77
description = "Dead simple async pool for diesel"
88
keywords = ["async", "database", "pool", "diesel"]
@@ -25,12 +25,12 @@ serde = ["deadpool/serde"]
2525
tracing = ["deadpool-sync/tracing"]
2626

2727
[dependencies]
28-
deadpool = { path = "../", version = "0.11.0", default-features = false, features = [
28+
deadpool = { path = "../", version = "0.12.0", default-features = false, features = [
2929
"managed",
3030
] }
3131
deadpool-sync = { path = "../sync", version = "0.1.1" }
32-
diesel = { version = "2.0.0", default-features = false }
32+
diesel = { version = "2.2.0", default-features = false }
3333

3434
[dev-dependencies]
35-
diesel = { version = "2.0.0", default-features = false, features = ["sqlite"] }
35+
diesel = { version = "2.2.0", default-features = false, features = ["sqlite"] }
3636
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread"] }

diesel/LICENSE-APACHE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-APACHE

diesel/LICENSE-MIT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-MIT

diesel/src/manager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ where
131131
impl<C> managed::Manager for Manager<C>
132132
where
133133
C: diesel::Connection + 'static,
134-
diesel::dsl::BareSelect<diesel::dsl::AsExprOf<i32, diesel::sql_types::Integer>>:
134+
diesel::helper_types::select<diesel::dsl::AsExprOf<i32, diesel::sql_types::Integer>>:
135135
QueryFragment<C::Backend>,
136136
diesel::query_builder::SqlQuery: QueryFragment<C::Backend>,
137137
{
@@ -163,7 +163,7 @@ where
163163
impl<C> RecyclingMethod<C>
164164
where
165165
C: diesel::Connection,
166-
diesel::dsl::BareSelect<diesel::dsl::AsExprOf<i32, diesel::sql_types::Integer>>:
166+
diesel::helper_types::select<diesel::dsl::AsExprOf<i32, diesel::sql_types::Integer>>:
167167
QueryFragment<C::Backend>,
168168
diesel::query_builder::SqlQuery: QueryFragment<C::Backend>,
169169
{

examples/postgres-axum/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "postgres-axum"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
axum = { version = "0.7.5", features = ["json"] }
8+
thiserror = "1.0.60"
9+
tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] }
10+
deadpool-postgres = { path = "../../postgres", features = ["serde"] }
11+
tokio-postgres = { version = "0.7.10", features = ["with-uuid-1"] }
12+
dotenvy = "0.15.7"
13+
uuid = { version = "1.8.0", features = ["serde"] }
14+
serde = { version = "1.0.200", features = ["derive"] }
15+
config = "0.14.0"
16+
axum-macros = "0.4.1"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy