1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-05-19 16:58:14 +00:00

Merge branch 'master' into scope_work

This commit is contained in:
Jon Lim 2023-09-13 21:59:45 -07:00
commit efe990dca5
8 changed files with 75 additions and 57 deletions

View file

@ -1,12 +1,10 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
- package-ecosystem: cargo
directory: /
schedule:
interval: "monthly"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
interval: "monthly"
open-pull-requests-limit: 10
interval: daily

View file

@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
run: |

View file

@ -28,7 +28,7 @@ jobs:
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install OpenSSL
if: matrix.target.os == 'windows-latest'
@ -40,12 +40,14 @@ jobs:
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Install Rust (${{ matrix.version.name }})
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: ${{ matrix.version.version }}
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
uses: taiki-e/install-action@v2.18.9
with:
tool: cargo-hack
- name: check minimal
run: cargo ci-check-min
@ -77,13 +79,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
uses: taiki-e/install-action@v2.18.9
with:
tool: cargo-hack
- name: check feature combinations
run: cargo ci-check-all-feature-powerset
@ -96,13 +100,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
- name: Install nextest
uses: taiki-e/install-action@nextest
uses: taiki-e/install-action@v2.18.9
with:
tool: nextest
- name: Test with cargo-nextest
run: cargo nextest run

View file

@ -33,7 +33,7 @@ jobs:
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install OpenSSL
if: matrix.target.os == 'windows-latest'
@ -45,18 +45,21 @@ jobs:
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Install Rust (${{ matrix.version.name }})
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: ${{ matrix.version.version }}
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
uses: taiki-e/install-action@v2.18.9
with:
tool: cargo-hack
- name: workaround MSRV issues
if: matrix.version.name != 'stable'
if: matrix.version.name == 'msrv'
run: |
cargo update -p=clap --precise=4.3.24
cargo update -p=clap_lex --precise=0.5.0
cargo update -p=anstyle --precise=1.0.2
- name: check minimal
run: cargo ci-check-min
@ -87,11 +90,12 @@ jobs:
name: io-uring tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly
- name: tests (io-uring)
timeout-minutes: 60
@ -102,11 +106,12 @@ jobs:
name: doc tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly
- name: doc tests
run: cargo ci-doctest

View file

@ -5,7 +5,7 @@ on:
types: [opened, synchronize, reopened]
permissions:
contents: read # to fetch code (actions/checkout)
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@ -15,9 +15,9 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly
components: rustfmt
@ -30,43 +30,49 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: { components: clippy }
- uses: giraffate/clippy-action@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
reporter: 'github-pr-check'
components: clippy
- uses: giraffate/clippy-action@v1.0.1
with:
reporter: github-pr-check
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: --workspace --all-features --tests --examples --bins -- -Dclippy::todo -Aunknown_lints
lint-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: { components: rust-docs }
- uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly
components: rust-docs
- name: Check for broken intra-doc links
env: { RUSTDOCFLAGS: "-D warnings" }
run: cargo doc --no-deps --all-features --workspace
env:
RUSTDOCFLAGS: -D warnings
run: cargo +nightly doc --no-deps --workspace --all-features
public-api-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly-2023-08-25 }
- uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly-2023-08-25
- uses: taiki-e/cache-cargo-install-action@v1
with: { tool: cargo-public-api }
- uses: taiki-e/cache-cargo-install-action@v1.2.1
with:
tool: cargo-public-api
- name: generate API diff
run: |

View file

@ -15,14 +15,15 @@ jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2.13.4
uses: taiki-e/install-action@v2.18.9
with:
tool: cargo-llvm-cov

View file

@ -5,8 +5,7 @@ on:
branches: [master]
permissions:
contents: read # to fetch code (actions/checkout)
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@ -14,14 +13,17 @@ concurrency:
jobs:
build:
permissions:
contents: write # to push changes in repo (jamesives/github-pages-deploy-action)
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly
- name: Build Docs
run: cargo +nightly doc --no-deps --workspace --all-features

View file

@ -32,8 +32,8 @@ pub(crate) type FnDataFactory =
/// Since the Actix Web router layers application data, the returned object will reference the
/// "closest" instance of the type. For example, if an `App` stores a `u32`, a nested `Scope`
/// also stores a `u32`, and the delegated request handler falls within that `Scope`, then
/// extracting a `web::<Data<u32>>` for that handler will return the `Scope`'s instance.
/// However, using the same router set up and a request that does not get captured by the `Scope`,
/// extracting a `web::Data<u32>` for that handler will return the `Scope`'s instance. However,
/// using the same router set up and a request that does not get captured by the `Scope`,
/// `web::<Data<u32>>` would return the `App`'s instance.
///
/// If route data is not set for a handler, using `Data<T>` extractor would cause a `500 Internal