Skip to content

Commit 9495442

Browse files
committed
Adjust runtime feature validation logic
Removes compile-time checks in `sqlx-rt` that prevented multiple runtime features (_rt-actix, _rt-async-std, _rt-tokio) from being enabled simultaneously. The TLS feature conflict check is also modified to error if `_tls-rustls` is enabled, rather than when both TLS backends are active. CI changes: - Expand `check` job matrix to include async-std and actix runtimes. - Pin one `cargo check` invocation to `runtime-tokio-rustls`. - Remove `--all-targets` from two `cargo check` invocations. Fixes a typo in `sqlx-macros` (`procmacr2` -> `procmacro2`).
1 parent b508f37 commit 9495442

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

.github/workflows/sqlx.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
runs-on: ubuntu-22.04
2020
strategy:
2121
matrix:
22+
runtime: [async-std, tokio, actix]
2223
tls: [native-tls, rustls]
2324
steps:
2425
- uses: actions/checkout@v4
@@ -27,22 +28,18 @@ jobs:
2728
cargo check
2829
--manifest-path sqlx-core/Cargo.toml
2930
--no-default-features
30-
--all-targets
31-
--features offline,all-databases,all-types,migrate,runtime-tokio-${{ matrix.tls }}
31+
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
3232
env:
3333
RUSTFLAGS: -D warnings
34-
3534
- run:
3635
cargo check
3736
--no-default-features
38-
--all-targets
39-
--features offline,all-databases,all-types,migrate,runtime-tokio-${{ matrix.tls }},macros
40-
37+
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }},macros
4138
- run:
4239
cargo check
4340
--no-default-features
4441
--all-targets
45-
--features offline,all-databases,migrate,runtime-tokio-${{ matrix.tls }},macros
42+
--features offline,all-databases,migrate,runtime-tokio-rustls,macros
4643

4744
test:
4845
name: Unit Test

sqlx-macros/src/query/data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub mod offline {
132132
query_data
133133
};
134134

135-
#[cfg(procmacr2_semver_exempt)]
135+
#[cfg(procmacro2_semver_exempt)]
136136
{
137137
let path = path.as_ref().canonicalize()?;
138138
let path = path.to_str().ok_or_else(|| {

0 commit comments

Comments
 (0)