repo
stringlengths
5
53
pr_number
int32
1
321k
task_type
stringclasses
2 values
issue_text
stringlengths
0
81.2k
pr_title
stringlengths
1
319
pr_body
stringlengths
0
105k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
gold_diff
stringlengths
0
202M
changed_files
listlengths
0
100
review_threads
listlengths
0
100
test_patch
stringlengths
0
23.4M
merged
bool
1 class
tokio-rs/axum
3,791
issue_to_patch
chore(deps): bump release-plz/action from 0.5.128 to 0.5.129
Bumps [release-plz/action](https://github.com/release-plz/action) from 0.5.128 to 0.5.129. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/release-plz/action/releases">release-plz/action's releases</a>.</em></p> <blockquote> <h2>v0.5.129</h2> <h2>What's Changed</h2> <ul> <li>c...
df2b4a0830c2e7232fe515c81607defa79212259
512ec10de7effc0e027c876c7450af8737b63a07
diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml index a1b7095d03..c2fc086fed 100644 --- a/.github/workflows/release-plz.yml +++ b/.github/workflows/release-plz.yml @@ -29,7 +29,7 @@ jobs: with: toolchain: stable - name: Run release-plz - uses: release...
[ ".github/workflows/release-plz.yml" ]
[]
true
tokio-rs/axum
3,785
issue_to_patch
keep github actions updated
Documentation: https://release-plz.dev/docs/github/update Given this comment, dependabot should continue using pin dependencies: https://github.com/dependabot/dependabot-core/issues/7913#issuecomment-2748641653
4a72e063b916f39e0698a345a99a755deb8f345b
a802ab3d720f1acac5de4e446def510fa6ea6f17
diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..7ee8cf8249 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + # Check for updates every Monday + schedule: + interva...
[ ".github/dependabot.yml" ]
[ { "comment": "Nit, from my understanding this will run when we merge this and then every 7 days. So this would be true if we happen to merge this on a Monday, otherwise it's wrong.", "path": ".github/dependabot.yml", "hunk": "@@ -0,0 +1,7 @@\n+version: 2\n+updates:\n+ - package-ecosystem: \"github-acti...
true
tokio-rs/axum
3,781
issue_to_patch
examples: remove redundant borrows in form example format args
The `check (examples)` CI job currently fails on every open PR (and on `main`): ``` error: redundant reference in `format!` argument --> form/src/main.rs:73:9 = note: `-D clippy::useless-borrows-in-formatting` implied by `-D warnings` ``` `&input.email` and `&input.name` are redundant, because `format!` already ...
b99e25d01f2ffa29e5138a0cc337b6b831a41285
c2f3ae7ba72ee423ef338826705acfc84eb1c2db
diff --git a/examples/form/src/main.rs b/examples/form/src/main.rs index 9eec5b6735..f14321beb1 100644 --- a/examples/form/src/main.rs +++ b/examples/form/src/main.rs @@ -68,10 +68,7 @@ struct Input { async fn accept_form(Form(input): Form<Input>) -> Html<String> { dbg!(&input); - Html(format!( - "ema...
[ "examples/form/src/main.rs" ]
[]
true
tokio-rs/axum
3,769
issue_to_patch
Documentation about Key::derive_from lists wrong feature name - [X] I have looked for existing issues (including closed) about this ## Bug Report ### Version Latest ### Platform N/A but I'm on Linux ### Crates axum-extra ### Description The documentation for `Key::derive_from` ( https://doc...
docs(cookie): clarify cookie-key-expansion for Key::derive_from (fixes #2646)
## Summary - Document in `extract::cookie` that `Key::derive_from` requires `cookie-key-expansion` on `axum-extra`, not `key-expansion` from the `cookie` crate. - Add module-level note linking to the crate feature flags table. ## Test plan - [x] Docs-only change Fixes #2646
6ed9210351633ed2c420dc051dc0a13b73744dfe
5f1495875f885c266235651f77db28812a230065
diff --git a/axum-extra/src/extract/cookie/mod.rs b/axum-extra/src/extract/cookie/mod.rs index 372a2212e7..10af3bfc16 100644 --- a/axum-extra/src/extract/cookie/mod.rs +++ b/axum-extra/src/extract/cookie/mod.rs @@ -1,6 +1,12 @@ //! Cookie parsing and cookie jar management. //! //! See [`CookieJar`], [`SignedCookieJa...
[ "axum-extra/src/extract/cookie/mod.rs" ]
[]
true
tokio-rs/axum
3,771
issue_to_patch
Router path compile-time check - [x] I have looked for existing issues (including closed) about this ## Feature Request ### Motivation I just had an application compile fine, only to immediately crash on boot. It gave me the error message that "Paths must start with a `/`". A reasonable limitation - I was careless....
docs(routing): document path must start with in route()
## Summary Documents that `Router::route` panics when `path` does not start with `/`, including the nested-router case from the issue report. Fixes #3752 ## Test plan - [ ] Docs render correctly on docs.rs
6ed9210351633ed2c420dc051dc0a13b73744dfe
3425ffae3ac2add4d76b726ded2b15713f1843db
diff --git a/axum/src/docs/routing/route.md b/axum/src/docs/routing/route.md index bb4ac530d9..d8b1fc7513 100644 --- a/axum/src/docs/routing/route.md +++ b/axum/src/docs/routing/route.md @@ -176,4 +176,6 @@ let app = Router::new() The static route `/foo` and the dynamic route `/{key}` are not considered to overlap an...
[ "axum/src/docs/routing/route.md" ]
[]
true
tokio-rs/axum
3,539
issue_to_patch
examples: Update to sqlx 0.9
Updates to `sqlx` 0.9.
7eee934487c8752958063b4ba9c24fb536339541
fc319f3ff27eee8e1a14ea908a54cde8db7d757f
diff --git a/examples/Cargo.lock b/examples/Cargo.lock index 45eb3a5db0..b8897bb982 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -284,7 +284,7 @@ dependencies = [ "serde_html_form", "serde_json", "serde_path_to_error", - "sha1", + "sha1 0.10.6", "sync_wrapper", "tokio", "tokio-tungstenite",...
[ "examples/Cargo.lock", "examples/sqlx-postgres/Cargo.toml" ]
[ { "comment": "Would it make sense to wait until 0.9 is fully released and out of testing phase?\n\nIf people do `cargo add sqlx` they'll still get 0.8", "path": "examples/sqlx-postgres/Cargo.toml", "hunk": "@@ -10,4 +10,4 @@ tokio = { version = \"1.0\", features = [\"full\"] }\n tracing = \"0.1\"\n trac...
true
tokio-rs/axum
3,539
comment_to_fix
examples: Update to sqlx 0.9
Would it make sense to wait until 0.9 is fully released and out of testing phase? If people do `cargo add sqlx` they'll still get 0.8
7eee934487c8752958063b4ba9c24fb536339541
fc319f3ff27eee8e1a14ea908a54cde8db7d757f
diff --git a/examples/sqlx-postgres/Cargo.toml b/examples/sqlx-postgres/Cargo.toml index 0a0c437630..d06c7fd1ce 100644 --- a/examples/sqlx-postgres/Cargo.toml +++ b/examples/sqlx-postgres/Cargo.toml @@ -10,4 +10,4 @@ tokio = { version = "1.0", features = ["full"] } tracing = "0.1" tracing-subscriber = { version = "0....
[ "examples/sqlx-postgres/Cargo.toml" ]
[ { "comment": "Would it make sense to wait until 0.9 is fully released and out of testing phase?\n\nIf people do `cargo add sqlx` they'll still get 0.8", "path": "examples/sqlx-postgres/Cargo.toml", "hunk": "@@ -10,4 +10,4 @@ tokio = { version = \"1.0\", features = [\"full\"] }\n tracing = \"0.1\"\n trac...
true
tokio-rs/axum
3,773
issue_to_patch
fix(examples): add missing `sink` feature for futures-channel in `example-testing-websockets`
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/axum/blob/master/CONTRIBUTING.md --> ## Motivation The official testing-websockets example fails to co...
d97edd2eb3349a3b1f01f05c9150bb364faa4a80
e49e81634e9055dd5dc13baea5d1c4be3a6ed731
diff --git a/examples/testing-websockets/Cargo.toml b/examples/testing-websockets/Cargo.toml index 2798118848..2a8cfa2117 100644 --- a/examples/testing-websockets/Cargo.toml +++ b/examples/testing-websockets/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] axum = { path = "../../axum", features = ["ws"] } ...
[ "examples/testing-websockets/Cargo.toml" ]
[]
true
tokio-rs/axum
3,764
issue_to_patch
chore: write changelogs manually
I think for 0.9 we should just write the changelog manually. Then we can figure out how to automate things afterwards.
c21fcae0878de0446b38668b0a2072cc8811a6f6
39c8e8c5254ff100d40a74dedddb2712a39d489a
diff --git a/axum/release-plz.toml b/release-plz.toml similarity index 67% rename from axum/release-plz.toml rename to release-plz.toml index 691d34c9bb..e4c9ced069 100644 --- a/axum/release-plz.toml +++ b/release-plz.toml @@ -6,3 +6,7 @@ release_always = false # Label release PRs for easy identification # https://re...
[ "release-plz.toml" ]
[]
true
tokio-rs/axum
3,768
issue_to_patch
Fix `bytes` dependency incompatibility with v0.8
## Motivation `axum` v0.8 is incompatible with `bytes <1.7`, but the dependency version requirement allows incompatible versions: https://github.com/tokio-rs/axum/blob/6f01ad2840b62f3fc8848f66ac1607b41c6b1ee7/axum/Cargo.toml#L56 Because of this, I ran into compiler errors during the v0.7.2 -> v0.8.9 upgrade: ...
6f01ad2840b62f3fc8848f66ac1607b41c6b1ee7
b81841d16b7a617792520f6d3a7ebaa240b72ee4
diff --git a/axum/Cargo.toml b/axum/Cargo.toml index f0c216fc2b..248731e64c 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -53,7 +53,7 @@ __private = ["tokio", "http1", "dep:reqwest"] [dependencies] axum-core = { path = "../axum-core", version = "0.5.5" } -bytes = "1.0" +bytes = "1.7" futures-util = { versi...
[ "axum/Cargo.toml" ]
[]
true
tokio-rs/axum
3,760
issue_to_patch
`FromRequest` derive with `Option<T>` field unexpected semantics <!-- Thank you for reporting an issue. Please fill in as much of the template below as you're able. --> - [x] I have looked for existing issues (including closed) about this ## Bug Report ### Version 0.8.8 ### Platform `25.2.0 Darwin Kernel Versio...
fix(axum-macros): use OptionalFromRequest for Option<T> fields
This supersedes #3665 and closes #3623 by implementing proper rejection mapping using OptionalFromRequest/OptionalFromRequestParts and adding regression tests for JSON parsing errors. <!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new fe...
a480d71f6d55cef84f273e5a5e0563d5354ab328
3faf479562c5b87bfd4b785f53fff302d79dd806
diff --git a/axum-macros/CHANGELOG.md b/axum-macros/CHANGELOG.md index e60a577014..decb5172a8 100644 --- a/axum-macros/CHANGELOG.md +++ b/axum-macros/CHANGELOG.md @@ -9,8 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **breaking:** `#[from_request(via(Extractor))]` now us...
[ "axum-macros/CHANGELOG.md", "axum-macros/src/from_request/mod.rs", "axum-macros/src/lib.rs", "axum-macros/tests/from_request/fail/option_without_optional_from_request.rs", "axum-macros/tests/from_request/fail/option_without_optional_from_request.stderr", "axum-macros/tests/from_request/pass/option_via_jso...
[]
diff --git a/axum-macros/tests/from_request/fail/option_without_optional_from_request.rs b/axum-macros/tests/from_request/fail/option_without_optional_from_request.rs new file mode 100644 index 0000000000..ce33821586 --- /dev/null +++ b/axum-macros/tests/from_request/fail/option_without_optional_from_request.rs @@ -0,0...
true
tokio-rs/axum
3,762
issue_to_patch
Unexpected behaviour in example `static-file-server` - [X] I have looked for existing issues (including closed) about this ## Bug Report ### Version 0.7.5 ### Description Unexpected behaviour in example `static-file-server`, function [`using_serve_dir_with_assets_fallback()`](https://github.com/tokio-rs...
examples: fix `using_serve_dir_with_assets_fallback` to not expose assets at root
Closes #2809. Credit to @tobx, who identified the root cause and expected behavior in the issue thread. This is the implementation. ## Motivation The SPA example in `using_serve_dir_with_assets_fallback` is supposed to serve assets at `/assets/*` and return `index.html` for everything else. In practice, the router fa...
7a37cdd00a7307954999b75d467e6f404ff6e4e0
57f1e8f6912eb5c372af74bc5e0ad0c7c5fe01b5
diff --git a/examples/Cargo.lock b/examples/Cargo.lock index 92f475ab6b..45eb3a5db0 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -1611,6 +1611,7 @@ name = "example-static-file-server" version = "0.1.0" dependencies = [ "axum", + "http-body-util", "tokio", "tower", "tower-http", diff --git a/e...
[ "examples/Cargo.lock", "examples/static-file-server/Cargo.toml", "examples/static-file-server/src/main.rs", "examples/static-file-server/src/tests.rs" ]
[ { "comment": "Lets remove this. It'll just confuse people reading it later.\n\n```suggestion\n```", "path": "examples/static-file-server/src/tests.rs", "hunk": "@@ -0,0 +1,29 @@\n+use super::using_serve_dir_with_assets_fallback;\n+use axum::{body::Body, http::Request, http::StatusCode};\n+use http_body_...
true
tokio-rs/axum
3,762
comment_to_fix
examples: fix `using_serve_dir_with_assets_fallback` to not expose assets at root
Lets remove this. It'll just confuse people reading it later. ```suggestion ```
7a37cdd00a7307954999b75d467e6f404ff6e4e0
57f1e8f6912eb5c372af74bc5e0ad0c7c5fe01b5
diff --git a/examples/static-file-server/src/tests.rs b/examples/static-file-server/src/tests.rs new file mode 100644 index 0000000000..dbc0c47487 --- /dev/null +++ b/examples/static-file-server/src/tests.rs @@ -0,0 +1,28 @@ +use super::using_serve_dir_with_assets_fallback; +use axum::{body::Body, http::Request, http::...
[ "examples/static-file-server/src/tests.rs" ]
[ { "comment": "Lets remove this. It'll just confuse people reading it later.\n\n```suggestion\n```", "path": "examples/static-file-server/src/tests.rs", "hunk": "@@ -0,0 +1,29 @@\n+use super::using_serve_dir_with_assets_fallback;\n+use axum::{body::Body, http::Request, http::StatusCode};\n+use http_body_...
true
tokio-rs/axum
3,762
comment_to_fix
examples: fix `using_serve_dir_with_assets_fallback` to not expose assets at root
Shouldn't this return 404? ```suggestion assert_eq!(response.status(), StatusCode::NOT_FOUND); ```
7a37cdd00a7307954999b75d467e6f404ff6e4e0
57f1e8f6912eb5c372af74bc5e0ad0c7c5fe01b5
diff --git a/examples/static-file-server/src/tests.rs b/examples/static-file-server/src/tests.rs new file mode 100644 index 0000000000..dbc0c47487 --- /dev/null +++ b/examples/static-file-server/src/tests.rs @@ -0,0 +1,28 @@ +use super::using_serve_dir_with_assets_fallback; +use axum::{body::Body, http::Request, http::...
[ "examples/static-file-server/src/tests.rs" ]
[ { "comment": "Shouldn't this return 404?\n\n```suggestion\n assert_eq!(response.status(), StatusCode::NOT_FOUND);\n```", "path": "examples/static-file-server/src/tests.rs", "hunk": "@@ -0,0 +1,29 @@\n+use super::using_serve_dir_with_assets_fallback;\n+use axum::{body::Body, http::Request, http::Statu...
true
tokio-rs/axum
3,759
issue_to_patch
examples: Update to diesel-async 0.9
Updates to `diesel-async` 0.9.
5bc0046084b873def38d07b6394039d3849d0a29
d4ead7c3d57240fa98cf10587629b752119b1425
diff --git a/examples/Cargo.lock b/examples/Cargo.lock index a22095d914..92f475ab6b 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -957,9 +957,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.3.6" +version = "2.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -che...
[ "examples/Cargo.lock", "examples/diesel-async-postgres/Cargo.toml" ]
[]
true
tokio-rs/axum
3,758
issue_to_patch
chore: fix typos
Threw an LLM at our docs and told it to find and fix typos.
c8276951b08898bb280aac2c47907a7d8d0e24e4
4a91ec191aea17897533d7a32a87748175741b1d
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d3932c2d7..53ffe2599c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ describes the _minimum_ behavior expected from all contributors. For any issue, there are fundamentally three ways an individual can contribute: 1. By opening the issue fo...
[ "CONTRIBUTING.md", "axum-core/src/extract/default_body_limit.rs", "axum-core/src/extract/rejection.rs", "axum-extra/src/extract/cached.rs", "axum-extra/src/extract/cookie/private.rs", "axum-extra/src/handler/mod.rs", "axum-extra/src/response/multiple.rs", "axum-macros/src/debug_handler.rs", "axum-ma...
[ { "comment": "I'm not a native speaker, but the comma after the `i.e.` seems strange to me.\n```suggestion\n// Therefore the router type becomes `Router<()>`, i.e. a router\n```", "path": "axum/src/docs/routing/with_state.md", "hunk": "@@ -121,7 +121,7 @@ let router: Router<AppState> = Router::new()\n /...
diff --git a/axum-macros/tests/debug_middleware/fail/next_not_last.stderr b/axum-macros/tests/debug_middleware/fail/next_not_last.stderr index 4a5fea4546..3b85fc9e74 100644 --- a/axum-macros/tests/debug_middleware/fail/next_not_last.stderr +++ b/axum-macros/tests/debug_middleware/fail/next_not_last.stderr @@ -1,4 +1,4 ...
true
tokio-rs/axum
3,758
comment_to_fix
chore: fix typos
I'm not a native speaker, but the comma after the `i.e.` seems strange to me. ```suggestion // Therefore the router type becomes `Router<()>`, i.e. a router ```
c8276951b08898bb280aac2c47907a7d8d0e24e4
4a91ec191aea17897533d7a32a87748175741b1d
diff --git a/axum/src/docs/routing/with_state.md b/axum/src/docs/routing/with_state.md index eda2344b1e..ac7ad867b0 100644 --- a/axum/src/docs/routing/with_state.md +++ b/axum/src/docs/routing/with_state.md @@ -135,7 +135,7 @@ axum::serve(listener, router).await; # }; ``` -Perhaps a little counter intuitively, `Rou...
[ "axum/src/docs/routing/with_state.md" ]
[ { "comment": "I'm not a native speaker, but the comma after the `i.e.` seems strange to me.\n```suggestion\n// Therefore the router type becomes `Router<()>`, i.e. a router\n```", "path": "axum/src/docs/routing/with_state.md", "hunk": "@@ -121,7 +121,7 @@ let router: Router<AppState> = Router::new()\n /...
true
tokio-rs/axum
3,757
issue_to_patch
feat: Add `RawPathParams::from_request_extensions`
Adds `RawPathParams::from_request_extensions` which can be called outside an `async` context akin to `Json::from_bytes`. Requested here https://github.com/tokio-rs/axum/issues/3017#issuecomment-2733227558
c2612e2839af2e162d197db6d55abdf45edc8968
e75019dfec2a93f3f789613629a35f88615ca262
diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index dd3cead379..ca9099fd93 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 tasks are spawned, enabling use cases like tracing and telemetry instrumentation ([...
[ "axum/CHANGELOG.md", "axum/src/extract/path/mod.rs" ]
[]
true
tokio-rs/axum
3,742
issue_to_patch
body: Introduce Bodies of Unknown Size
As reported in <https://github.com/tokio-rs/axum/issues/3741>, in some responses to HEAD requests, the header `content-type: 0` would be included, even though the size of the body was not known and also not zero. The reason for this was that `axum::body::Body::empty`, which represents a body that is *known to be emp...
986abe8df66f7b22582cfb54d8891abb34452aae
f13cc1b32e4a328216435abb95cb23f8d48cf017
diff --git a/axum-core/CHANGELOG.md b/axum-core/CHANGELOG.md index ebeed0b972..e5cbe6c279 100644 --- a/axum-core/CHANGELOG.md +++ b/axum-core/CHANGELOG.md @@ -9,8 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **added:** `ResponseParts::status` and `ResponseParts::status_...
[ "axum-core/CHANGELOG.md", "axum-core/src/body.rs", "axum-core/src/body/unknown.rs", "axum-core/src/response/into_response.rs", "axum/CHANGELOG.md", "axum/src/routing/route.rs" ]
[ { "comment": "@davidpdrsn please note this change in particular. Tests are passing and it seems to achieve what I want, but for an outsider like me it is hard to judge whether this actually is a sane change.\n\nWhat is difficult for me to assess is the intention behind the semantics of converting `()` into a re...
true
tokio-rs/axum
3,742
comment_to_fix
body: Introduce Bodies of Unknown Size
Might be good to expand a bit on what exactly an "unknown body" is. Maybe we could copy the docs from `pub(crate) struct Unknown<D>` to this method as well, since `Unknown` isn't public.
986abe8df66f7b22582cfb54d8891abb34452aae
f13cc1b32e4a328216435abb95cb23f8d48cf017
diff --git a/axum-core/src/body.rs b/axum-core/src/body.rs index cbc5606b1b..4e921c1e3c 100644 --- a/axum-core/src/body.rs +++ b/axum-core/src/body.rs @@ -1,5 +1,8 @@ //! HTTP body utilities. +mod unknown; +pub(crate) use unknown::Unknown; + use crate::{BoxError, Error}; use bytes::Bytes; use futures_core::{Strea...
[ "axum-core/src/body.rs" ]
[ { "comment": "Might be good to expand a bit on what exactly an \"unknown body\" is. Maybe we could copy the docs from `pub(crate) struct Unknown<D>` to this method as well, since `Unknown` isn't public.", "path": "axum-core/src/body.rs", "hunk": "@@ -53,6 +56,11 @@ impl Body {\n Self::new(http_b...
true
tokio-rs/axum
3,737
issue_to_patch
remove ECOSYSTEM.md
I don't think ECOSYSTEM.md makes much sense anymore: - It creates a bunch of churn and drive by PRs. - Its sometimes hard to decide which things should or shouldn't be included. - Its likely full of stale projects and I don't think it should be anyone's job to prune it. I do think it made sense when axum was ne...
de9f13d809e86f8bf24292aac0af16d97ef91195
cb2333618a61ff706e5aa68834fd70db1d316efa
diff --git a/ECOSYSTEM.md b/ECOSYSTEM.md deleted file mode 100644 index 1f9bea4eac..0000000000 --- a/ECOSYSTEM.md +++ /dev/null @@ -1,137 +0,0 @@ -# Community Projects - -If your project isn't listed here and you would like it to be, please feel free to create a PR. - -## Community maintained axum ecosystem - -- [axum-...
[ "ECOSYSTEM.md" ]
[]
true
tokio-rs/axum
3,749
issue_to_patch
chore: use a more recent nightly for axum-macros tests
I had to update the version on v0.8.x so figured I might as well do it here to keep them in sync.
9b203a8912bc9f943605a742d7406d84795b3af2
36cb3ea502b85413f05f9d4ddacc6cb911d40677
diff --git a/axum-macros/rust-toolchain b/axum-macros/rust-toolchain index c55fe8ed75..4dfbaabd64 100644 --- a/axum-macros/rust-toolchain +++ b/axum-macros/rust-toolchain @@ -1,1 +1,1 @@ -nightly-2025-09-28 +nightly-2026-05-04
[ "axum-macros/rust-toolchain", "axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr", "axum-macros/tests/debug_handler/fail/wrong_return_tuple.stderr", "axum-macros/tests/from_request/fail/generic_without_via.stderr", "axum-macros/tests/from_request/fail/generic_without_via_rejection.stderr", ...
[]
diff --git a/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr b/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr index d50c8c3a94..bf3b8b3fec 100644 --- a/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr +++ b/axum-macros/tests/debug_handler/fail/json_not_deserialize.stde...
true
tokio-rs/axum
3,747
issue_to_patch
integrate release-plz
Cherry picks #3739
2b38288f613b154d21835f88e8a04a9149e40823
2943371c0e8cddc741c7defdfe0e5f73c9c12913
diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000000..a1b7095d03 --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,57 @@ +name: Release-plz + +on: + push: + branches: + - main + - v0.8.x + +jobs: + # Release unpublished pa...
[ ".github/workflows/release-plz.yml", "axum/release-plz.toml" ]
[]
true
tokio-rs/axum
3,746
issue_to_patch
main to v0.8.x cherry picks
Cherry picks these onto 0.8 branch: - #3743 - #3721 - #3723 - #3702 Also had to bump to a more recently nightly for running axum-macros tests which made a bunch of trybuild snapshots change. All changes look okay though.
c59208c86fded335cd85e388030ad59347b0e5ae
6f0955799bc8fa08d8e3f93243c589090166297a
diff --git a/Cargo.lock b/Cargo.lock index 08fa9e53e4..338c398c3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3200,9 +3200,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.8.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e1ffaa40ddd1f3ed91f717...
[ "Cargo.lock", "axum-core/CHANGELOG.md", "axum-core/src/response/into_response.rs", "axum-core/src/response/into_response_parts.rs", "axum-macros/rust-toolchain", "axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr", "axum-macros/tests/debug_handler/fail/extension_not_clone.stderr", "ax...
[]
diff --git a/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr b/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr index 29cb4765c3..681473ea29 100644 --- a/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr +++ b/axum-macros/tests/debug_handler/fail/argument_not_extrac...
true
tokio-rs/axum
3,739
issue_to_patch
integrate release-plz
Before merging this, we need to: - change GitHub permissions so that this action can create PR: https://release-plz.dev/docs/github/quickstart#1-change-github-actions-permissions - Set the CARGO_REGISTRY_TOKEN secret: https://release-plz.dev/docs/github/quickstart#2-set-the-cargo_registry_token-secret
9f4d52e310a6053e49f3db09ce02f723a7a3f5bb
943246f28f6306c4692a0ca42c74a51b01b4c14c
diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000000..a1b7095d03 --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,57 @@ +name: Release-plz + +on: + push: + branches: + - main + - v0.8.x + +jobs: + # Release unpublished pa...
[ ".github/workflows/release-plz.yml", "axum/release-plz.toml" ]
[]
true
tokio-rs/axum
3,743
issue_to_patch
refactor: remove duplication between `IntoResponse` and `IntoResponseParts` for `Redirect`
b0123f70513e8519c4adfbfe2d0ebfd8f543cb33
d6a3f510358f57ba8b192fbc0655c764ab144337
diff --git a/axum/src/response/redirect.rs b/axum/src/response/redirect.rs index 4fb1ec4649..77c66cfd4f 100644 --- a/axum/src/response/redirect.rs +++ b/axum/src/response/redirect.rs @@ -86,10 +86,7 @@ impl Redirect { impl IntoResponse for Redirect { fn into_response(self) -> Response { - match HeaderVal...
[ "axum/src/response/redirect.rs" ]
[]
true
tokio-rs/axum
3,744
issue_to_patch
chore: Remove ECOSYSTEM.md mentions from README.md
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/axum/blob/master/CONTRIBUTING.md --> ## Motivation ECOSYSTEM.md has been removed https://github.com/...
b0123f70513e8519c4adfbfe2d0ebfd8f543cb33
568baecf06fa6ccb3d74695d58e70a9917c01b94
diff --git a/axum/README.md b/axum/README.md index 47ac45c721..98bc134c2e 100644 --- a/axum/README.md +++ b/axum/README.md @@ -116,17 +116,12 @@ axum's MSRV is 1.80. ## Examples The [examples] folder contains various examples of how to use `axum`. The -[docs] also provide lots of code snippets and examples. For ful...
[ "axum/README.md" ]
[]
true
tokio-rs/axum
3,721
issue_to_patch
impl IntoResponseParts for Redirect - [x] I have looked for existing issues (including closed) about this ## Feature Request ### Motivation [RFC 9110] specifies this about [303 See Other]: > Except for responses to a HEAD request, the representation of a 303 response ought to contain a short hypertext note with a ...
feat: impl IntoResponseParts for Redirect
## What Implement `IntoResponseParts` for `Redirect`, allowing it to be used as part of a response tuple alongside a custom body. ## Why [RFC 9110 §15.4.4](https://datatracker.ietf.org/doc/html/rfc9110#name-303-see-other) recommends that redirect responses (especially 303 See Other) include a short hypertext note wi...
bff1764b700884250d6f0644392d6c5a2ba2c9e0
686f7f1ff97c1ab1a11fe619f13bf01d56952e1d
diff --git a/axum-core/CHANGELOG.md b/axum-core/CHANGELOG.md index 2dfeaa7dfe..ebeed0b972 100644 --- a/axum-core/CHANGELOG.md +++ b/axum-core/CHANGELOG.md @@ -5,6 +5,13 @@ 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/...
[ "axum-core/CHANGELOG.md", "axum-core/src/response/into_response_parts.rs", "axum/CHANGELOG.md", "axum/src/response/redirect.rs" ]
[]
true
tokio-rs/axum
3,724
issue_to_patch
test: add serve module integration tests
## Motivation The `axum::serve` module is critical infrastructure, but its test coverage focuses mainly on compile-time checks (`if_it_compiles_it_works`), `local_addr()` verification, and graceful shutdown timeout behavior. There are no tests covering the actual HTTP request/response flow through the serve pipeline f...
9f4d52e310a6053e49f3db09ce02f723a7a3f5bb
b7fba201f2bdf6ebaa9c1ac1f0b52b99b8a9fb0d
diff --git a/axum/src/serve/mod.rs b/axum/src/serve/mod.rs index 3698934cee..3f42cfbc29 100644 --- a/axum/src/serve/mod.rs +++ b/axum/src/serve/mod.rs @@ -1043,6 +1043,126 @@ mod tests { assert_eq!(body, "Hello, World!"); } + // Asserts the documented `with_graceful_shutdown` drain semantics: after t...
[ "axum/src/serve/mod.rs" ]
[]
true
tokio-rs/axum
3,704
issue_to_patch
Allow customizing the executor used by `axum::serve` - [x] I have looked for existing issues (including closed) about this ## Feature Request ### Motivation `axum::serve` hardcodes `TokioExecutor` for spawning connection tasks and hyper's internal HTTP/2 tasks. This is the one thing that can't be customized from th...
Add Serve::with_executor and Executor trait for custom task spawning
Closes #3703 ## Motivation `axum::serve` hardcodes `TokioExecutor` for spawning connection tasks and hyper's internal HTTP/2 tasks. This is the one thing that cannot be customized by wrapping axum's API from the outside, users are forced to reimplement the entire serve loop (~150 lines) just to swap the execut...
309d1bd9530eec2217134cb262760af1df42ee3b
aa51de89c86ac57511cb49dd73878810cb7c98a0
diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index 471df7e953..7bffad579f 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 (because it was already never terminating if that method wasn't used) ([#3601]) - ...
[ "axum/CHANGELOG.md", "axum/src/serve/mod.rs" ]
[ { "comment": "interesting side effect. I guess is a result of making it the default generic. It might be worth having our own TokioExecutor type to avoid having the default generic by the hyper_util type", "path": "axum/Cargo.toml", "hunk": "@@ -26,6 +26,7 @@ allowed_external_types = [\n \"futures_c...
true
tokio-rs/axum
3,704
comment_to_fix
Add Serve::with_executor and Executor trait for custom task spawning
Do you think that this could be use to spawn other futures with a different output? Would it make sense to copy the signature from tokio::spawn here? Or is it better to keep it constraint to `()` for now, to make it easier to provide custom `Executor`
309d1bd9530eec2217134cb262760af1df42ee3b
aa51de89c86ac57511cb49dd73878810cb7c98a0
diff --git a/axum/src/serve/mod.rs b/axum/src/serve/mod.rs index 05751d2f40..3698934cee 100644 --- a/axum/src/serve/mod.rs +++ b/axum/src/serve/mod.rs @@ -8,16 +8,17 @@ use std::{ io, marker::PhantomData, pin::pin, + sync::Arc, }; use axum_core::{body::Body, extract::Request, response::Response}; ...
[ "axum/src/serve/mod.rs" ]
[ { "comment": "Do you think that this could be use to spawn other futures with a different output?\nWould it make sense to copy the signature from tokio::spawn here?\nOr is it better to keep it constraint to `()` for now, to make it easier to provide custom `Executor`", "path": "axum/src/serve/mod.rs", "...
true
tokio-rs/axum
3,704
comment_to_fix
Add Serve::with_executor and Executor trait for custom task spawning
The test should be independent of tokio if we're doing this. Something like `futures::excutor::LocalPool`. My worry here is that this looks like it's supposed to be general, but from your motivation it seems you just want to be able to run some hooks before spawning tokio tasks and that's the scenario you've actually ...
309d1bd9530eec2217134cb262760af1df42ee3b
aa51de89c86ac57511cb49dd73878810cb7c98a0
diff --git a/axum/src/serve/mod.rs b/axum/src/serve/mod.rs index 05751d2f40..3698934cee 100644 --- a/axum/src/serve/mod.rs +++ b/axum/src/serve/mod.rs @@ -8,16 +8,17 @@ use std::{ io, marker::PhantomData, pin::pin, + sync::Arc, }; use axum_core::{body::Body, extract::Request, response::Response}; ...
[ "axum/src/serve/mod.rs" ]
[ { "comment": "The test should be independent of tokio if we're doing this. Something like `futures::excutor::LocalPool`.\n\nMy worry here is that this looks like it's supposed to be general, but from your motivation it seems you just want to be able to run some hooks before spawning tokio tasks and that's the s...
true
tokio-rs/axum
3,704
comment_to_fix
Add Serve::with_executor and Executor trait for custom task spawning
```suggestion /// Adapts axum's [`Executor`] to hyper's [`Executor<Fut>`](hyper::rt::Executor). ```
309d1bd9530eec2217134cb262760af1df42ee3b
aa51de89c86ac57511cb49dd73878810cb7c98a0
diff --git a/axum/src/serve/mod.rs b/axum/src/serve/mod.rs index 05751d2f40..3698934cee 100644 --- a/axum/src/serve/mod.rs +++ b/axum/src/serve/mod.rs @@ -8,16 +8,17 @@ use std::{ io, marker::PhantomData, pin::pin, + sync::Arc, }; use axum_core::{body::Body, extract::Request, response::Response}; ...
[ "axum/src/serve/mod.rs" ]
[ { "comment": "```suggestion\n/// Adapts axum's [`Executor`] to hyper's [`Executor<Fut>`](hyper::rt::Executor).\n```", "path": "axum/src/serve/mod.rs", "hunk": "@@ -365,12 +542,27 @@ where\n }\n }\n \n-async fn handle_connection<L, M, S, B>(\n+/// Adapts axum's [`Executor`] to hyper's `Executor<Fut>`...
true
tokio-rs/axum
3,723
issue_to_patch
feat: add `#[diagnostic::on_unimplemented]` to `IntoResponse` and `IntoResponseParts`
## Motivation The `FromRequest`, `FromRequestParts`, and `Handler` traits already use `#[diagnostic::on_unimplemented]` to provide helpful compiler messages when users encounter trait bound errors. However, `IntoResponse` and `IntoResponseParts` — two of the most commonly encountered traits in error messages — lack th...
7be02d77545cb918ad2f6b9b62c81fe769afaab6
fbf922a5c9db8fbe1bcd6deaa0a7c6214371669f
diff --git a/axum-core/src/response/into_response.rs b/axum-core/src/response/into_response.rs index a311851c2c..5cb9187c1e 100644 --- a/axum-core/src/response/into_response.rs +++ b/axum-core/src/response/into_response.rs @@ -109,6 +109,9 @@ use std::{ /// let app = Router::new().route("/", get(|| async { MyBody }));...
[ "axum-core/src/response/into_response.rs", "axum-core/src/response/into_response_parts.rs", "axum-macros/tests/debug_handler/fail/single_wrong_return_tuple.stderr", "axum-macros/tests/debug_handler/fail/wrong_return_tuple.stderr", "axum-macros/tests/debug_handler/fail/wrong_return_type.stderr" ]
[]
diff --git a/axum-macros/tests/debug_handler/fail/single_wrong_return_tuple.stderr b/axum-macros/tests/debug_handler/fail/single_wrong_return_tuple.stderr index 835de128d9..da8b0b88b1 100644 --- a/axum-macros/tests/debug_handler/fail/single_wrong_return_tuple.stderr +++ b/axum-macros/tests/debug_handler/fail/single_wro...
true
tokio-rs/axum
3,722
issue_to_patch
no logs in example tracing-aka-logging Example [tracing-aka-logging](https://github.com/tokio-rs/axum/tree/main/examples/tracing-aka-logging) does not make any request logs
fix: add tracing calls to tracing-aka-logging example closures
## Motivation The `tracing-aka-logging` example's `on_request`, `on_response`, `on_body_chunk`, `on_eos`, and `on_failure` closures were empty no-ops. Since providing custom closures to `TraceLayer` **replaces** the default `DefaultOnRequest`, `DefaultOnResponse`, etc. behavior, the example produced zero request logs ...
7dcc0db31e512c86242a2d46a4a90ceae1802ed0
662d09ff87a61b925fc790d83bb94fbb31557839
diff --git a/examples/tracing-aka-logging/src/main.rs b/examples/tracing-aka-logging/src/main.rs index 06a8c08df2..299cdeba04 100644 --- a/examples/tracing-aka-logging/src/main.rs +++ b/examples/tracing-aka-logging/src/main.rs @@ -65,21 +65,22 @@ async fn main() { // You can use `_span.record("some...
[ "examples/tracing-aka-logging/src/main.rs" ]
[]
true
tokio-rs/axum
3,729
issue_to_patch
chore: inline links in the ECOSYSTEM.md
To make the format of the file more unified and easier to maintain.
99205dbb1094cb011a3024ec1e22eb478120f6a7
28c7a41e86877628c85d437efde4e6ba6f51af60
diff --git a/ECOSYSTEM.md b/ECOSYSTEM.md index 08fa6416ef..1f9bea4eac 100644 --- a/ECOSYSTEM.md +++ b/ECOSYSTEM.md @@ -73,7 +73,7 @@ If your project isn't listed here and you would like it to be, please feel free - [notify.run](https://github.com/notify-run/notify-run-rs): HTTP-to-WebPush relay for sending desktop/mob...
[ "ECOSYSTEM.md" ]
[]
true
tokio-rs/axum
3,727
issue_to_patch
chore: remove axum-kit from ECOSYSTEM as the repository does not exists (any more)
6fcf0a25b61d55c64243cd5707d1de940139f9e6
d7a364d7746a9e92bacf3f33fccd0a95de7c1d9c
diff --git a/ECOSYSTEM.md b/ECOSYSTEM.md index f17214f334..3317658d19 100644 --- a/ECOSYSTEM.md +++ b/ECOSYSTEM.md @@ -54,7 +54,6 @@ If your project isn't listed here and you would like it to be, please feel free - [axum-rails-cookie](https://github.com/endoze/axum-rails-cookie): Extract rails session cookies in axum ...
[ "ECOSYSTEM.md" ]
[]
true
tokio-rs/axum
3,728
issue_to_patch
chore: remove axum_guard_logic from ECOSYSTEM.md
As the repository does not exist any more. The original author was @sjud
6fcf0a25b61d55c64243cd5707d1de940139f9e6
2618d2e2e2231f1aaa57d0940502cebafd6daa63
diff --git a/ECOSYSTEM.md b/ECOSYSTEM.md index f17214f334..0a99e6a7bb 100644 --- a/ECOSYSTEM.md +++ b/ECOSYSTEM.md @@ -23,7 +23,6 @@ If your project isn't listed here and you would like it to be, please feel free - [axum-streams](https://github.com/abdolence/axum-streams-rs): Streaming HTTP body with different formats...
[ "ECOSYSTEM.md" ]
[]
true
tokio-rs/axum
3,702
issue_to_patch
Bump matchit to 0.9.2
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/axum/blob/master/CONTRIBUTING.md --> ## Motivation Explained in #3140 - primarily to be able to use ...
67ce49aa52d082738e3fe661884e1019cde80c93
1f3619ee1a79584652de44e1857a33aebd5c7a83
diff --git a/Cargo.lock b/Cargo.lock index b5a2677f88..6eae7e7891 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -976,9 +976,9 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "matchit" -version = "0.8.4" +version = "0.9.2" source = "registry+https://github.com/rust-...
[ "Cargo.lock", "axum/CHANGELOG.md", "axum/Cargo.toml", "axum/src/docs/routing/route.md", "axum/src/extract/matched_path.rs", "axum/src/extract/path/mod.rs", "axum/src/routing/strip_prefix.rs", "axum/src/routing/tests/mod.rs", "axum/src/routing/tests/nest.rs", "examples/Cargo.lock" ]
[ { "comment": "Nit, `{other_file}` is invalid, it must start with a forward slash so it should be `/{other_file}`.", "path": "axum/src/docs/routing/route.md", "hunk": "@@ -45,20 +45,14 @@ regular expression. You must handle that manually in your handlers.\n Captures must not be empty. For example `/a/` w...
diff --git a/axum/src/routing/tests/mod.rs b/axum/src/routing/tests/mod.rs index aae2cb615c..20077a0b88 100644 --- a/axum/src/routing/tests/mod.rs +++ b/axum/src/routing/tests/mod.rs @@ -434,6 +434,114 @@ async fn what_matches_wildcard() { assert_eq!(get("/x/a/b/").await, "x"); } +#[crate::test] +async fn prefi...
true
tokio-rs/axum
3,702
comment_to_fix
Bump matchit to 0.9.2
Nit, `{other_file}` is invalid, it must start with a forward slash so it should be `/{other_file}`.
67ce49aa52d082738e3fe661884e1019cde80c93
1f3619ee1a79584652de44e1857a33aebd5c7a83
diff --git a/axum/src/docs/routing/route.md b/axum/src/docs/routing/route.md index 528f8e1ab0..bb4ac530d9 100644 --- a/axum/src/docs/routing/route.md +++ b/axum/src/docs/routing/route.md @@ -1,7 +1,7 @@ Add another route to the router. `path` is a string of path segments separated by `/`. Each segment -can be eithe...
[ "axum/src/docs/routing/route.md" ]
[ { "comment": "Nit, `{other_file}` is invalid, it must start with a forward slash so it should be `/{other_file}`.", "path": "axum/src/docs/routing/route.md", "hunk": "@@ -45,20 +45,14 @@ regular expression. You must handle that manually in your handlers.\n Captures must not be empty. For example `/a/` w...
true
tokio-rs/axum
3,702
comment_to_fix
Bump matchit to 0.9.2
`/{id}.jpg` is valid to be added here, there's no conflict since it also uses just a suffix, same as `/{id}.png`. The other one with prefix is invalid though. Maybe you wanted to also have a prefix in the first one?
67ce49aa52d082738e3fe661884e1019cde80c93
1f3619ee1a79584652de44e1857a33aebd5c7a83
diff --git a/axum/src/docs/routing/route.md b/axum/src/docs/routing/route.md index 528f8e1ab0..bb4ac530d9 100644 --- a/axum/src/docs/routing/route.md +++ b/axum/src/docs/routing/route.md @@ -1,7 +1,7 @@ Add another route to the router. `path` is a string of path segments separated by `/`. Each segment -can be eithe...
[ "axum/src/docs/routing/route.md" ]
[ { "comment": "`/{id}.jpg` is valid to be added here, there's no conflict since it also uses just a suffix, same as `/{id}.png`. The other one with prefix is invalid though.\n\nMaybe you wanted to also have a prefix in the first one?", "path": "axum/src/docs/routing/route.md", "hunk": "@@ -45,20 +45,14 @...
true
tokio-rs/axum
3,702
comment_to_fix
Bump matchit to 0.9.2
Since this needs other changes anyway, could you please add something with a longer but matching suffix like `/{id}.old.png` so that it's clear that this does not collide with `/{id}.png`?
67ce49aa52d082738e3fe661884e1019cde80c93
1f3619ee1a79584652de44e1857a33aebd5c7a83
diff --git a/axum/src/docs/routing/route.md b/axum/src/docs/routing/route.md index 528f8e1ab0..bb4ac530d9 100644 --- a/axum/src/docs/routing/route.md +++ b/axum/src/docs/routing/route.md @@ -1,7 +1,7 @@ Add another route to the router. `path` is a string of path segments separated by `/`. Each segment -can be eithe...
[ "axum/src/docs/routing/route.md" ]
[ { "comment": "Since this needs other changes anyway, could you please add something with a longer but matching suffix like `/{id}.old.png` so that it's clear that this does not collide with `/{id}.png`?", "path": "axum/src/docs/routing/route.md", "hunk": "@@ -45,20 +45,14 @@ regular expression. You must...
true
tokio-rs/axum
3,702
comment_to_fix
Bump matchit to 0.9.2
The second example that cannot be added is the same as the already registered partial match? Also, at this point, it's illegal to register _any_ other partial matches, right?
67ce49aa52d082738e3fe661884e1019cde80c93
1f3619ee1a79584652de44e1857a33aebd5c7a83
diff --git a/axum/src/docs/routing/route.md b/axum/src/docs/routing/route.md index 528f8e1ab0..bb4ac530d9 100644 --- a/axum/src/docs/routing/route.md +++ b/axum/src/docs/routing/route.md @@ -1,7 +1,7 @@ Add another route to the router. `path` is a string of path segments separated by `/`. Each segment -can be eithe...
[ "axum/src/docs/routing/route.md" ]
[ { "comment": "The second example that cannot be added is the same as the already registered partial match?\n\nAlso, at this point, it's illegal to register _any_ other partial matches, right?", "path": "axum/src/docs/routing/route.md", "hunk": "@@ -45,20 +45,14 @@ regular expression. You must handle tha...
true
tokio-rs/axum
3,702
comment_to_fix
Bump matchit to 0.9.2
Can you also add a few collision tests please? You can pretty much copy `colliding_fallback_with_wildcard` just for partial capture routes.
67ce49aa52d082738e3fe661884e1019cde80c93
1f3619ee1a79584652de44e1857a33aebd5c7a83
diff --git a/axum/src/routing/tests/mod.rs b/axum/src/routing/tests/mod.rs index aae2cb615c..20077a0b88 100644 --- a/axum/src/routing/tests/mod.rs +++ b/axum/src/routing/tests/mod.rs @@ -434,6 +434,114 @@ async fn what_matches_wildcard() { assert_eq!(get("/x/a/b/").await, "x"); } +#[crate::test] +async fn prefi...
[ "axum/src/routing/tests/mod.rs" ]
[ { "comment": "Can you also add a few collision tests please? You can pretty much copy `colliding_fallback_with_wildcard` just for partial capture routes.", "path": "axum/src/routing/tests/mod.rs", "hunk": "@@ -461,15 +460,64 @@ async fn prefix_suffix_match() {\n assert_eq!(get(\"/a.png\").await, \"p...
true
tokio-rs/axum
3,702
comment_to_fix
Bump matchit to 0.9.2
This one's probably on me, but add a link to this PR please.
67ce49aa52d082738e3fe661884e1019cde80c93
1f3619ee1a79584652de44e1857a33aebd5c7a83
diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index c1c53eaf75..1ed165873c 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **changed:** `serve` has an additional generic argument and can now work with any r...
[ "axum/CHANGELOG.md" ]
[ { "comment": "This one's probably on me, but add a link to this PR please.", "path": "axum/CHANGELOG.md", "hunk": "@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0\n - **changed:** `serve` has an additional generic argument and can now work with any resp...
true
tokio-rs/axum
3,720
issue_to_patch
axum: Add missing PR link to changelog (#3635)
## Motivation A changelog entry referes to a PR, but the link is missing ## Solution Add the missing link
f31dcd3c1efd7d471c001360f8babf30cbce741a
1736e26de84481bb1db4bbf7472e8dc9ca2d8df6
diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index 1ed165873c..471df7e953 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#3601]: https://github.com/tokio-rs/axum/pull/3601 [#3489]: https://github.com/toki...
[ "axum/CHANGELOG.md" ]
[]
true
tokio-rs/axum
3,708
issue_to_patch
chore: let's use only https links in the ECOSYSTEM.md
all other links are https and this one also redirects to https so it is better to use that link in the file.
441216428893d13544f12722b54dcaaadd47135a
a0b16d20110fb7534926ea3d52aaf7f3c7e97821
diff --git a/ECOSYSTEM.md b/ECOSYSTEM.md index 64a4589bad..ddae8221c4 100644 --- a/ECOSYSTEM.md +++ b/ECOSYSTEM.md @@ -27,7 +27,7 @@ If your project isn't listed here and you would like it to be, please feel free - [axum-casbin-auth](https://github.com/casbin-rs/axum-casbin-auth): Casbin access control middleware for ...
[ "ECOSYSTEM.md" ]
[]
true
tokio-rs/axum
3,706
issue_to_patch
chore: update link to rgit, add gitore
rgit seems to be unmaintained, but there is a fork called gitore See also https://github.com/w4/rgit/issues/198
441216428893d13544f12722b54dcaaadd47135a
f744e9a562b5509ce0ab2bc4f162df2d6f5a4bef
diff --git a/ECOSYSTEM.md b/ECOSYSTEM.md index 64a4589bad..4af6b5c683 100644 --- a/ECOSYSTEM.md +++ b/ECOSYSTEM.md @@ -88,7 +88,8 @@ If your project isn't listed here and you would like it to be, please feel free - [wastebin](https://github.com/matze/wastebin): A minimalist pastebin service. - [sandbox_axum_observabi...
[ "ECOSYSTEM.md" ]
[]
true
tokio-rs/axum
3,705
issue_to_patch
chore: link to service does not work any more
## Motivation Clean up the ECOSYSTEM.md
441216428893d13544f12722b54dcaaadd47135a
6a4187c47a8223b62b38879ff22e6c25977ea3f4
diff --git a/ECOSYSTEM.md b/ECOSYSTEM.md index 64a4589bad..423bda9c4c 100644 --- a/ECOSYSTEM.md +++ b/ECOSYSTEM.md @@ -82,7 +82,7 @@ If your project isn't listed here and you would like it to be, please feel free - [RUSTfulapi](https://github.com/robatipoor/rustfulapi): Reusable template for building REST Web Services...
[ "ECOSYSTEM.md" ]
[]
true
tokio-rs/axum
3,717
issue_to_patch
Yanns/v0.8.9
Releases: - axum 0.8.9 - axum-extra 0.12.6 - axum-macros 0.5.1 Cherry-picked: - https://github.com/tokio-rs/axum/pull/3615 - https://github.com/tokio-rs/axum/pull/3616 - https://github.com/tokio-rs/axum/pull/3597 - in release notes - https://github.com/tokio-rs/axum/pull/3620 - in release notes - https://git...
441216428893d13544f12722b54dcaaadd47135a
19fa67d481cd7deb6bcde0eb922b5ec73b2e141e
diff --git a/Cargo.lock b/Cargo.lock index d905b4b67b..b5a2677f88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,7 +99,7 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axum" -version = "0.8.8" +version = "0.8.9" dependencies = [ "anyhow", "axum-core", @@ -...
[ "Cargo.lock", "axum-extra/CHANGELOG.md", "axum-extra/Cargo.toml", "axum-macros/CHANGELOG.md", "axum-macros/Cargo.toml", "axum/CHANGELOG.md", "axum/Cargo.toml", "examples/Cargo.lock", "examples/key-value-store/src/main.rs" ]
[]
true
tokio-rs/axum
3,699
issue_to_patch
V0.8.9
Prepare following releases: - ~~axum-core 0.5.6~~ - axum 0.8.9 - axum-extra 0.12.6 - axum-macros 0.5.1 Cherry-picked: - https://github.com/tokio-rs/axum/pull/3615 - https://github.com/tokio-rs/axum/pull/3616 - https://github.com/tokio-rs/axum/pull/3597 - in release notes - https://github.com/tokio-rs/axum/pu...
9c67c6c33a0986cdf1d6ac17e2b1048235be938f
6046a30d497020d6816abf885ffed16c9f625406
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 28d2b521ef..fde79f4bb9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,7 +2,7 @@ name: CI env: CARGO_TERM_COLOR: always - MSRV: '1.78' + MSRV: '1.80' on: push: diff --git a/Cargo.lock b/Cargo.lock index 96c5b...
[ ".github/workflows/CI.yml", "Cargo.lock", "Cargo.toml", "ECOSYSTEM.md", "axum-core/CHANGELOG.md", "axum-core/Cargo.toml", "axum-core/src/extract/from_ref.rs", "axum-core/src/response/into_response.rs", "axum-core/src/response/into_response_parts.rs", "axum-core/src/response/mod.rs", "axum-extra/...
[]
diff --git a/axum/src/routing/tests/merge.rs b/axum/src/routing/tests/merge.rs index b760184f54..206eb8e9bc 100644 --- a/axum/src/routing/tests/merge.rs +++ b/axum/src/routing/tests/merge.rs @@ -127,7 +127,10 @@ async fn layer_and_handle_error() { let one = Router::new().route("/foo", get(|| async {})); let t...
true
tokio-rs/axum
3,701
issue_to_patch
docs: add rovo
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/axum/blob/master/CONTRIBUTING.md --> ## Motivation Adds [rovo](https://github.com/Arthurdw/rovo) to ...
7c7a03927af82ccd4c7d71a1603b7e4ec094ea58
9ae3dee7a0b6695fbb26f74ed1b4ba3e5ce1a384
diff --git a/ECOSYSTEM.md b/ECOSYSTEM.md index a2c094acc1..64a4589bad 100644 --- a/ECOSYSTEM.md +++ b/ECOSYSTEM.md @@ -27,6 +27,7 @@ If your project isn't listed here and you would like it to be, please feel free - [axum-casbin-auth](https://github.com/casbin-rs/axum-casbin-auth): Casbin access control middleware for ...
[ "ECOSYSTEM.md" ]
[]
true
tokio-rs/axum
3,695
issue_to_patch
[FIX] link to query-params-with-empty-string
The example was removed for axum 0.9 at cae6bc37097ea61fcdf9416 but the link in the doc hardcoded “main” Fixes tokio-rs/axum#3691 ## Motivation https://docs.rs/axum/0.8.8/axum/extract/struct.Query.html has a link to https://github.com/tokio-rs/axum/blob/main/examples/query-params-with-empty-strings/src/main.rs...
8144052e7406ddd15ea166e18be9655294842f3c
cbfcbd0161053ad12f84d448763dc64a978e53a1
diff --git a/axum-extra/src/extract/query.rs b/axum-extra/src/extract/query.rs index 625c583f03..1ab45c0116 100644 --- a/axum-extra/src/extract/query.rs +++ b/axum-extra/src/extract/query.rs @@ -46,7 +46,7 @@ use serde_core::de::DeserializeOwned; /// For handling values being empty vs missing see the [query-params-wit...
[ "axum-extra/src/extract/query.rs", "axum/src/extract/query.rs" ]
[]
true
tokio-rs/axum
3,698
issue_to_patch
fix security advisories in axum v0.8
Fix for: - https://github.com/advisories/GHSA-434x-w66g-qw3r - https://github.com/time-rs/time/blob/main/CHANGELOG.md#0347-2026-02-05 This fixes the CI pipeline for the `v0.8.x` branch
d456816f49c8798917e4184a66a6be8d1a9fa1b1
4edf92ff4ec4c52ea0ce32d905d8c515c6251517
diff --git a/Cargo.lock b/Cargo.lock index 50d551d4ce..96c5b553c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -725,9 +725,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-...
[ "Cargo.lock" ]
[]
true
tokio-rs/axum
3,683
issue_to_patch
docs: consolidate state management docs in crate root
## Motivation The `Router<S> -> Router<()>` transformation and the `FromRef` substate pattern are correct and well-designed, but non-obvious. Three failure modes recur in issues and discussions: 1. Forgetting `.with_state()` - produces a cryptic type mismatch at `.into_make_service()` or `serve()` rather than a c...
a3446d68bc03d61fb8e7513052bad2825d0c0db1
9fda07a63b6090a3a143e320eed524d0334e7c61
diff --git a/axum-core/src/extract/from_ref.rs b/axum-core/src/extract/from_ref.rs index d38d121c52..cda952aff5 100644 --- a/axum-core/src/extract/from_ref.rs +++ b/axum-core/src/extract/from_ref.rs @@ -1,13 +1,14 @@ /// Used to do reference-to-value conversions thus not consuming the input value. /// /// This is ma...
[ "axum-core/src/extract/from_ref.rs", "axum/src/docs/routing/with_state.md", "axum/src/extract/state.rs", "axum/src/lib.rs" ]
[ { "comment": "```suggestion\n//! `Router<S>` when `S` is not `()` means a router that is _missing_ a state of type `S`. Calling\n```", "path": "axum/src/lib.rs", "hunk": "@@ -183,6 +183,51 @@\n //! # let _: Router = app;\n //! ```\n //!\n+//! State is cloned for every request. Wrapping your state in `Ar...
true
tokio-rs/axum
3,683
comment_to_fix
docs: consolidate state management docs in crate root
```suggestion //! `Router<S>` when `S` is not `()` means a router that is _missing_ a state of type `S`. Calling ```
a3446d68bc03d61fb8e7513052bad2825d0c0db1
9fda07a63b6090a3a143e320eed524d0334e7c61
diff --git a/axum/src/lib.rs b/axum/src/lib.rs index 03cd997933..3e3b4bd5fb 100644 --- a/axum/src/lib.rs +++ b/axum/src/lib.rs @@ -183,6 +183,51 @@ //! # let _: Router = app; //! ``` //! +//! State is cloned for every request. Wrapping your state in `Arc` makes those +//! clones cheap. If all fields are already chea...
[ "axum/src/lib.rs" ]
[ { "comment": "```suggestion\n//! `Router<S>` when `S` is not `()` means a router that is _missing_ a state of type `S`. Calling\n```", "path": "axum/src/lib.rs", "hunk": "@@ -183,6 +183,51 @@\n //! # let _: Router = app;\n //! ```\n //!\n+//! State is cloned for every request. Wrapping your state in `Ar...
true
tokio-rs/axum
3,694
issue_to_patch
examples: Update to diesel-async 0.8
Updates to `diesel-async` 0.8.
907ba35b5bcf587ac30c21906de7d057449aa696
91978507607a14c21b76a8b3c6ec88409b1c5df6
diff --git a/examples/Cargo.lock b/examples/Cargo.lock index 671bdbb49b..d46d6efe97 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -971,15 +971,16 @@ dependencies = [ [[package]] name = "diesel-async" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-ind...
[ "examples/Cargo.lock", "examples/diesel-async-postgres/Cargo.toml" ]
[]
true
tokio-rs/axum
3,692
issue_to_patch
ci: Update to cargo-sort 2.1.3
Updates to `cargo-sort` 2.1.3.
bc2ab88afe2956259ebc061e3bd739d499283451
272cf8e615b010ec7f982c228407b3270ce24a52
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 797203e65d..ee5e0d9f58 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -203,7 +203,7 @@ jobs: - name: Install cargo-sort uses: taiki-e/install-action@v2 with: - tool: cargo-sort@2.0.2 + ...
[ ".github/workflows/CI.yml" ]
[]
true
tokio-rs/axum
3,689
issue_to_patch
Update to tokio-tungstenite 0.29
Updates to `tokio-tungstenite` 0.29.
da26db264f811e73485f1db1c134d374e8f99464
065226b6adf78c5114164e3d29fcb6bae1f9e972
diff --git a/Cargo.lock b/Cargo.lock index 0b355e72d7..d905b4b67b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1744,9 +1744,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25a406cddcc...
[ "Cargo.lock", "axum/Cargo.toml", "examples/Cargo.lock", "examples/testing-websockets/Cargo.toml", "examples/websockets/Cargo.toml" ]
[]
true
tokio-rs/tokio
8,080
issue_to_patch
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/tokio/blob/master/CONTRIBUTING.md The contributors guide includes instructions for running rustfmt and b...
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/fs/mocks.rs b/tokio/src/fs/mocks.rs index ae5d7e5368e..138e12ac6bb 100644 --- a/tokio/src/fs/mocks.rs +++ b/tokio/src/fs/mocks.rs @@ -106,6 +106,15 @@ impl From<MockFile> for OwnedFd { } } +#[cfg(all(test, unix))] +impl From<OwnedFd> for MockFile { + #[inline] + fn from(file: OwnedF...
[ "tokio/src/fs/mocks.rs", "tokio/src/fs/open_options.rs", "tokio/src/fs/read.rs", "tokio/src/fs/read_uring.rs", "tokio/src/fs/try_exists.rs", "tokio/src/io/uring/mod.rs", "tokio/src/io/uring/statx.rs", "tokio/src/runtime/driver/op.rs", "tokio/tests/fs_uring_statx.rs", "tokio/tests/fs_uring_statx_fd...
[ { "comment": "out of curiosity, is it necessary to or the symlink flags with `libc::AT_STATX_SYNC_AS_STAT`? \n`libc::AT_STATX_SYNC_AS_STAT` = 0 from what I saw in `libc`, so this oring doesn't do anything.", "path": "tokio/src/io/uring/statx.rs", "hunk": "@@ -0,0 +1,152 @@\n+use crate::fs::File;\n+use c...
diff --git a/tokio/tests/fs_uring_statx.rs b/tokio/tests/fs_uring_statx.rs new file mode 100644 index 00000000000..3ddc5866e85 --- /dev/null +++ b/tokio/tests/fs_uring_statx.rs @@ -0,0 +1,303 @@ +//! Uring file operations tests. + +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + fe...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
out of curiosity, is it necessary to or the symlink flags with `libc::AT_STATX_SYNC_AS_STAT`? `libc::AT_STATX_SYNC_AS_STAT` = 0 from what I saw in `libc`, so this oring doesn't do anything.
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/io/uring/statx.rs b/tokio/src/io/uring/statx.rs new file mode 100644 index 00000000000..06a3e7e7bb8 --- /dev/null +++ b/tokio/src/io/uring/statx.rs @@ -0,0 +1,161 @@ +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + feature = "fs", + // libc::statx is only ...
[ "tokio/src/io/uring/statx.rs" ]
[ { "comment": "out of curiosity, is it necessary to or the symlink flags with `libc::AT_STATX_SYNC_AS_STAT`? \n`libc::AT_STATX_SYNC_AS_STAT` = 0 from what I saw in `libc`, so this oring doesn't do anything.", "path": "tokio/src/io/uring/statx.rs", "hunk": "@@ -0,0 +1,152 @@\n+use crate::fs::File;\n+use c...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
Interesting, why this change was needed?
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/fs/read.rs b/tokio/src/fs/read.rs index aabc994e95f..f4de3913144 100644 --- a/tokio/src/fs/read.rs +++ b/tokio/src/fs/read.rs @@ -54,14 +54,23 @@ use std::{io, path::Path}; /// } /// ``` pub async fn read(path: impl AsRef<Path>) -> io::Result<Vec<u8>> { - let path = path.as_ref().to_owned()...
[ "tokio/src/fs/read.rs" ]
[ { "comment": "Interesting, why this change was needed?", "path": "tokio/src/fs/read.rs", "hunk": "@@ -69,12 +69,17 @@ pub async fn read(path: impl AsRef<Path>) -> io::Result<Vec<u8>> {\n let handle = crate::runtime::Handle::current();\n let driver_handle = handle.inner.driver().io();\n ...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
```suggestion .check_and_init(io_uring::opcode::Statx::CODE) ```
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/fs/try_exists.rs b/tokio/src/fs/try_exists.rs index 2e8de04e0c5..01c439356fa 100644 --- a/tokio/src/fs/try_exists.rs +++ b/tokio/src/fs/try_exists.rs @@ -23,6 +23,67 @@ use std::path::Path; /// # } /// ``` pub async fn try_exists(path: impl AsRef<Path>) -> io::Result<bool> { - let path = pa...
[ "tokio/src/fs/try_exists.rs" ]
[ { "comment": "```suggestion\n .check_and_init(io_uring::opcode::Statx::CODE)\n```", "path": "tokio/src/fs/try_exists.rs", "hunk": "@@ -23,6 +23,43 @@ use std::path::Path;\n /// # }\n /// ```\n pub async fn try_exists(path: impl AsRef<Path>) -> io::Result<bool> {\n- let path = path.as_ref()...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
Does something guarantee that the File won't be dropped during the io uring call ? It this happens the kernel will try to use a closed fd or worse - a reused fd. IMO it should use an OwnedFd here.
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/io/uring/statx.rs b/tokio/src/io/uring/statx.rs new file mode 100644 index 00000000000..06a3e7e7bb8 --- /dev/null +++ b/tokio/src/io/uring/statx.rs @@ -0,0 +1,161 @@ +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + feature = "fs", + // libc::statx is only ...
[ "tokio/src/io/uring/statx.rs" ]
[ { "comment": "Does something guarantee that the File won't be dropped during the io uring call ?\nIt this happens the kernel will try to use a closed fd or worse - a reused fd.\nIMO it should use an OwnedFd here.", "path": "tokio/src/io/uring/statx.rs", "hunk": "@@ -0,0 +1,137 @@\n+use crate::fs::File;\...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
```suggestion asyncify(move || opts.open(path).map(File::from_std)).await ``` no need to unwrap+wrap Also the variable name is confusing. It is not `std` - it is a tokio::fs::File
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/fs/open_options.rs b/tokio/src/fs/open_options.rs index 27e98b5b234..99073a9d185 100644 --- a/tokio/src/fs/open_options.rs +++ b/tokio/src/fs/open_options.rs @@ -518,6 +518,10 @@ impl OpenOptions { /// [`Other`]: std::io::ErrorKind::Other /// [`PermissionDenied`]: std::io::ErrorKind::Pe...
[ "tokio/src/fs/open_options.rs" ]
[ { "comment": "```suggestion\n asyncify(move || opts.open(path).map(File::from_std)).await\n```\nno need to unwrap+wrap\nAlso the variable name is confusing. It is not `std` - it is a tokio::fs::File", "path": "tokio/src/fs/open_options.rs", "hunk": "@@ -544,12 +548,12 @@ impl OpenOptions {\n ...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
What is the reason to use `u32` here ? The flags are i32. And currently the callers cast i32 to u32, e.g. https://github.com/tokio-rs/tokio/pull/8080/changes#diff-245d7f607e2bab7a7358fa2126c82845bce7cb2a5725471f556424f6102ce456R75
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/io/uring/statx.rs b/tokio/src/io/uring/statx.rs new file mode 100644 index 00000000000..06a3e7e7bb8 --- /dev/null +++ b/tokio/src/io/uring/statx.rs @@ -0,0 +1,161 @@ +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + feature = "fs", + // libc::statx is only ...
[ "tokio/src/io/uring/statx.rs" ]
[ { "comment": "What is the reason to use `u32` here ?\nThe flags are i32. And currently the callers cast i32 to u32, e.g. https://github.com/tokio-rs/tokio/pull/8080/changes#diff-245d7f607e2bab7a7358fa2126c82845bce7cb2a5725471f556424f6102ce456R75", "path": "tokio/src/io/uring/statx.rs", "hunk": "@@ -0,0 ...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
This is not going to work because we run tests also on a kernel version <5.1 where io_uring is not available (see: https://github.com/tokio-rs/tokio/blob/e56ff72fe7574867c6c9bbd171afd8717897ea43/tokio/tests/fs_uring_cancel_open.rs#L43). I was thinking that we should skip some io_uring tests on 4.19 (or something el...
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/tests/fs_uring_statx.rs b/tokio/tests/fs_uring_statx.rs new file mode 100644 index 00000000000..3ddc5866e85 --- /dev/null +++ b/tokio/tests/fs_uring_statx.rs @@ -0,0 +1,303 @@ +//! Uring file operations tests. + +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + fe...
[ "tokio/tests/fs_uring_statx.rs" ]
[ { "comment": "This is not going to work because we run tests also on a kernel version <5.1 where io_uring is not available (see: https://github.com/tokio-rs/tokio/blob/e56ff72fe7574867c6c9bbd171afd8717897ea43/tokio/tests/fs_uring_cancel_open.rs#L43). \r\n\r\nI was thinking that we should skip some io_uring test...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
is this still needed given the cfg below?
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/fs/try_exists.rs b/tokio/src/fs/try_exists.rs index 2e8de04e0c5..01c439356fa 100644 --- a/tokio/src/fs/try_exists.rs +++ b/tokio/src/fs/try_exists.rs @@ -23,6 +23,67 @@ use std::path::Path; /// # } /// ``` pub async fn try_exists(path: impl AsRef<Path>) -> io::Result<bool> { - let path = pa...
[ "tokio/src/fs/try_exists.rs" ]
[ { "comment": "is this still needed given the cfg below?", "path": "tokio/src/fs/try_exists.rs", "hunk": "@@ -23,6 +23,71 @@ use std::path::Path;\n /// # }\n /// ```\n pub async fn try_exists(path: impl AsRef<Path>) -> io::Result<bool> {\n- let path = path.as_ref().to_owned();\n+ let path = path.as...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
Can we run this only on 7.1 with io_uring_supported?
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/tests/fs_uring_statx.rs b/tokio/tests/fs_uring_statx.rs new file mode 100644 index 00000000000..3ddc5866e85 --- /dev/null +++ b/tokio/tests/fs_uring_statx.rs @@ -0,0 +1,303 @@ +//! Uring file operations tests. + +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + fe...
[ "tokio/tests/fs_uring_statx.rs" ]
[ { "comment": "Can we run this only on 7.1 with io_uring_supported?", "path": "tokio/tests/fs_uring_statx.rs", "hunk": "@@ -0,0 +1,301 @@\n+//! Uring file operations tests.\n+\n+#![cfg(all(\n+ tokio_unstable,\n+ feature = \"io-uring\",\n+ feature = \"rt\",\n+ feature = \"fs\",\n+ target_os...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
Is there any reason to keep this given that's not used anywhere?
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/io/uring/statx.rs b/tokio/src/io/uring/statx.rs new file mode 100644 index 00000000000..06a3e7e7bb8 --- /dev/null +++ b/tokio/src/io/uring/statx.rs @@ -0,0 +1,161 @@ +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + feature = "fs", + // libc::statx is only ...
[ "tokio/src/io/uring/statx.rs" ]
[ { "comment": "Is there any reason to keep this given that's not used anywhere?", "path": "tokio/src/io/uring/statx.rs", "hunk": "@@ -0,0 +1,154 @@\n+#![cfg(all(\n+ tokio_unstable,\n+ feature = \"io-uring\",\n+ feature = \"rt\",\n+ feature = \"fs\",\n+ // libc::statx is only supported on t...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
nit: any strong reason to keep this comment? Given that this is default behavior of statx I think it can be removed
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/io/uring/statx.rs b/tokio/src/io/uring/statx.rs new file mode 100644 index 00000000000..06a3e7e7bb8 --- /dev/null +++ b/tokio/src/io/uring/statx.rs @@ -0,0 +1,161 @@ +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + feature = "fs", + // libc::statx is only ...
[ "tokio/src/io/uring/statx.rs" ]
[ { "comment": "nit: any strong reason to keep this comment? Given that this is default behavior of statx I think it can be removed", "path": "tokio/src/io/uring/statx.rs", "hunk": "@@ -0,0 +1,154 @@\n+#![cfg(all(\n+ tokio_unstable,\n+ feature = \"io-uring\",\n+ feature = \"rt\",\n+ feature = ...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
Instead of making the entire `read_uring` function depend on musl, please apply this change *only* to this step.
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/fs/read_uring.rs b/tokio/src/fs/read_uring.rs index 67d709a2ce3..ef5b2980979 100644 --- a/tokio/src/fs/read_uring.rs +++ b/tokio/src/fs/read_uring.rs @@ -19,9 +19,26 @@ const MAX_READ_SIZE: usize = 64 * 1024 * 1024; pub(crate) async fn read_uring(path: &Path) -> io::Result<Vec<u8>> { let fi...
[ "tokio/src/fs/read_uring.rs" ]
[ { "comment": "Instead of making the entire `read_uring` function depend on musl, please apply this change *only* to this step.", "path": "tokio/src/fs/read_uring.rs", "hunk": "@@ -14,28 +16,46 @@ const PROBE_SIZE_U32: u32 = PROBE_SIZE as u32;\n // Max bytes we can read using io uring submission at a tim...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
No need to allocate for this one. ```suggestion let empty_path: &'static CStr = c""; ```
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/io/uring/statx.rs b/tokio/src/io/uring/statx.rs new file mode 100644 index 00000000000..06a3e7e7bb8 --- /dev/null +++ b/tokio/src/io/uring/statx.rs @@ -0,0 +1,161 @@ +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + feature = "fs", + // libc::statx is only ...
[ "tokio/src/io/uring/statx.rs" ]
[ { "comment": "No need to allocate for this one.\n```suggestion\n let empty_path: &'static CStr = c\"\";\n```", "path": "tokio/src/io/uring/statx.rs", "hunk": "@@ -0,0 +1,154 @@\n+#![cfg(all(\n+ tokio_unstable,\n+ feature = \"io-uring\",\n+ feature = \"rt\",\n+ feature = \"fs\",\n+ ...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
This `box_assume_init` helper isn't needed. ```suggestion .map(|_| Metadata(unsafe { *self.buffer.as_ptr() })) ```
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/io/uring/statx.rs b/tokio/src/io/uring/statx.rs new file mode 100644 index 00000000000..06a3e7e7bb8 --- /dev/null +++ b/tokio/src/io/uring/statx.rs @@ -0,0 +1,161 @@ +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + feature = "fs", + // libc::statx is only ...
[ "tokio/src/io/uring/statx.rs" ]
[ { "comment": "This `box_assume_init` helper isn't needed.\n```suggestion\n .map(|_| Metadata(unsafe { *self.buffer.as_ptr() }))\n```", "path": "tokio/src/io/uring/statx.rs", "hunk": "@@ -0,0 +1,154 @@\n+#![cfg(all(\n+ tokio_unstable,\n+ feature = \"io-uring\",\n+ feature = \"rt\",\n+...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
nit: can move `self.poll_pending_counts += 1;` and `self.poll_senders[poll_count].send(()).unwrap();` out of the if statement
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/tests/fs_uring_statx_fd_leak_test.rs b/tokio/tests/fs_uring_statx_fd_leak_test.rs new file mode 100644 index 00000000000..c9d1efad1a1 --- /dev/null +++ b/tokio/tests/fs_uring_statx_fd_leak_test.rs @@ -0,0 +1,161 @@ +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + ...
[ "tokio/tests/fs_uring_statx_fd_leak_test.rs" ]
[ { "comment": "nit: can move `self.poll_pending_counts += 1;` and `self.poll_senders[poll_count].send(()).unwrap();` out of the if statement", "path": "tokio/tests/fs_uring_statx_fd_leak_test.rs", "hunk": "@@ -0,0 +1,166 @@\n+#![cfg(all(\n+ tokio_unstable,\n+ feature = \"io-uring\",\n+ feature =...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
This way we only use one `cfg` directive ```rust let size_hint: Option<usize> = file.metadata().await.map(|m| m.len() as usize).ok(); #[cfg(any( // statx is supported on gnu and android. // musl support lands in rust 1.93 (bundled musl 1.2.5): // https://blog.rust-lang.org/2025/12/05/Updating-musl-1.2.5/ ...
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/fs/read_uring.rs b/tokio/src/fs/read_uring.rs index 67d709a2ce3..ef5b2980979 100644 --- a/tokio/src/fs/read_uring.rs +++ b/tokio/src/fs/read_uring.rs @@ -19,9 +19,26 @@ const MAX_READ_SIZE: usize = 64 * 1024 * 1024; pub(crate) async fn read_uring(path: &Path) -> io::Result<Vec<u8>> { let fi...
[ "tokio/src/fs/read_uring.rs" ]
[ { "comment": "This way we only use one `cfg` directive\n\n```rust\nlet size_hint: Option<usize> = file.metadata().await.map(|m| m.len() as usize).ok();\n\n#[cfg(any(\n // statx is supported on gnu and android.\n // musl support lands in rust 1.93 (bundled musl 1.2.5):\n // https://blog.rust-lang.org/20...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
why we needed to change here ?
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/fs/open_options.rs b/tokio/src/fs/open_options.rs index 27e98b5b234..99073a9d185 100644 --- a/tokio/src/fs/open_options.rs +++ b/tokio/src/fs/open_options.rs @@ -518,6 +518,10 @@ impl OpenOptions { /// [`Other`]: std::io::ErrorKind::Other /// [`PermissionDenied`]: std::io::ErrorKind::Pe...
[ "tokio/src/fs/open_options.rs" ]
[ { "comment": "why we needed to change here ?", "path": "tokio/src/fs/open_options.rs", "hunk": "@@ -518,6 +518,10 @@ impl OpenOptions {\n /// [`Other`]: std::io::ErrorKind::Other\n /// [`PermissionDenied`]: std::io::ErrorKind::PermissionDenied\n pub async fn open(&self, path: impl AsRef<Path...
true
tokio-rs/tokio
8,080
comment_to_fix
Implemented io-uring `Op<Statx>` and applied to `read_uring` and `fs::try_exists`
@Darksonn should this struct be marked as `#[repr(C)]` since the path field here is being by the kernel? I know the `#[repr(C)]` removes dead code warning and is an indicator that this may be passing through an FFI boundary
da044f27d7470f605dffea94fb2473da06ea2a76
3a241593d310bd5c07fb7f3466b400d960009e22
diff --git a/tokio/src/io/uring/statx.rs b/tokio/src/io/uring/statx.rs new file mode 100644 index 00000000000..06a3e7e7bb8 --- /dev/null +++ b/tokio/src/io/uring/statx.rs @@ -0,0 +1,161 @@ +#![cfg(all( + tokio_unstable, + feature = "io-uring", + feature = "rt", + feature = "fs", + // libc::statx is only ...
[ "tokio/src/io/uring/statx.rs" ]
[ { "comment": "@Darksonn should this struct be marked as `#[repr(C)]` since the path field here is being by the kernel? I know the `#[repr(C)]` removes dead code warning and is an indicator that this may be passing through an FFI boundary", "path": "tokio/src/io/uring/statx.rs", "hunk": "@@ -0,0 +1,154 @...
true
tokio-rs/tokio
8,180
issue_to_patch
net: enable more TCP socket tests on Miri
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/tokio/blob/master/CONTRIBUTING.md The contributors guide includes instructions for running rustfmt and b...
32312ae0d6f0b1c6457f1323e3e7f568f448d0db
3067ed6a02bc4e800714d95095acaa2adcd16d47
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9a5e495e91..526c46a6c38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ env: rust_stable: stable rust_nightly: nightly-2025-10-12 # Pin a specific miri version - rust_miri_nightly: nightly-2026-05-20...
[ ".github/workflows/ci.yml", "tokio/tests/io_copy_bidirectional.rs", "tokio/tests/rt_common.rs", "tokio/tests/tcp_stream.rs" ]
[]
diff --git a/tokio/tests/io_copy_bidirectional.rs b/tokio/tests/io_copy_bidirectional.rs index 028cd97da53..3cdce32d0ce 100644 --- a/tokio/tests/io_copy_bidirectional.rs +++ b/tokio/tests/io_copy_bidirectional.rs @@ -89,7 +89,6 @@ async fn test_transfer_after_close() { } #[tokio::test] -#[cfg_attr(miri, ignore)] //...
true
tokio-rs/tokio
8,205
issue_to_patch
net: disable some Miri tests for TCP socket
This test is too slow and causes CI failures multiple times. - https://github.com/tokio-rs/tokio/actions/runs/27274974896/job/80554174300 - https://github.com/tokio-rs/tokio/actions/runs/27205813489/job/80321590056
ecb5125a6787b9d8eb818b1b00973bcd55ae77c0
355c905acffa87c1ded63dd459f144b310233575
[ "tokio/tests/io_copy_bidirectional.rs", "tokio/tests/rt_common.rs" ]
[ { "comment": "```suggestion\n #[cfg_attr(miri, ignore)] // Miri sometimes fails to establish the tcp connection\n```", "path": "tokio/tests/rt_common.rs", "hunk": "@@ -1155,6 +1155,7 @@ rt_test! {\n \n #[cfg(not(target_os = \"wasi\"))] // Wasi does not support bind\n #[test]\n+ #[cfg_attr(...
diff --git a/tokio/tests/io_copy_bidirectional.rs b/tokio/tests/io_copy_bidirectional.rs index 3cdce32d0ce..ab6a93ba3de 100644 --- a/tokio/tests/io_copy_bidirectional.rs +++ b/tokio/tests/io_copy_bidirectional.rs @@ -89,6 +89,7 @@ async fn test_transfer_after_close() { } #[tokio::test] +#[cfg_attr(miri, ignore)] //...
true
tokio-rs/tokio
8,205
comment_to_fix
net: disable some Miri tests for TCP socket
```suggestion #[cfg_attr(miri, ignore)] // Miri sometimes fails to establish the tcp connection ```
ecb5125a6787b9d8eb818b1b00973bcd55ae77c0
355c905acffa87c1ded63dd459f144b310233575
diff --git a/tokio/tests/rt_common.rs b/tokio/tests/rt_common.rs index 287d0e637a7..d736ee29c8e 100644 --- a/tokio/tests/rt_common.rs +++ b/tokio/tests/rt_common.rs @@ -1155,6 +1155,7 @@ rt_test! { #[cfg(not(target_os = "wasi"))] // Wasi does not support bind #[test] + #[cfg_attr(miri, ignore)] // Miri s...
[ "tokio/tests/rt_common.rs" ]
[ { "comment": "```suggestion\n #[cfg_attr(miri, ignore)] // Miri sometimes fails to establish the tcp connection\n```", "path": "tokio/tests/rt_common.rs", "hunk": "@@ -1155,6 +1155,7 @@ rt_test! {\n \n #[cfg(not(target_os = \"wasi\"))] // Wasi does not support bind\n #[test]\n+ #[cfg_attr(...
true
tokio-rs/tokio
8,202
issue_to_patch
Please document that Tokio doesn't work with `fork()` **Version** N/A - checked in current `master` and at `tokio-1.14.0` **Platform** N/A **Description** Over the last few days I've seen two people in the #tokio-users Discord having issues with `fork`ing. It seems the interactions between `fork()` and the ...
runtime: document interaction with fork()
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/tokio/blob/master/CONTRIBUTING.md The contributors guide includes instructions for running rustfmt and b...
bde89678532a8091d958268c0d36eac9362317d8
4b9b424598686cc3753365716c96d6c503270c61
diff --git a/tokio/src/runtime/mod.rs b/tokio/src/runtime/mod.rs index 2b3f0ad9b2d..05bb5fa6ee1 100644 --- a/tokio/src/runtime/mod.rs +++ b/tokio/src/runtime/mod.rs @@ -236,6 +236,20 @@ //! guaranteed to have been terminated. See the //! [struct level documentation](Runtime#shutdown) for more details. //! +//! ## Un...
[ "tokio/src/runtime/mod.rs" ]
[]
true
tokio-rs/tokio
8,189
issue_to_patch
Add a `tokio_stream::wrappers::JoinSetStream` **Is your feature request related to a problem? Please describe.** In `tokio` exists the `JoinSet`. It can be consumed through multiple calls to `join_next()`. But it can’t be consumed as a `Stream`. I understand `tokio` don’t depend on `futures` which explains why no `Str...
tokio-stream: add `Stream` wrapper for `JoinSet`
Fixes #8187 (contains the description and a motivation) ## Solution Mostly a copy of `ReceiverStream`. The main difference is the implementation of `Stream` itself. First, we do not return `T` but `Result<T, JoinError>` since each call to `join_next` can fail. And the implementation of `size_hint` is trivial (`Jo...
778e9d97d91cff2c3036cc5663936d479edb30cb
ebbdf4f0f8dfb0025588ccd53491f99ca3c1eef9
diff --git a/tokio-stream/Cargo.toml b/tokio-stream/Cargo.toml index 77f20761a62..72f0a7ae4f8 100644 --- a/tokio-stream/Cargo.toml +++ b/tokio-stream/Cargo.toml @@ -24,6 +24,7 @@ full = [ "net", "io-util", "fs", + "rt", "sync", "signal" ] @@ -32,6 +33,7 @@ time = ["tokio/time"] net = ["tok...
[ "tokio-stream/Cargo.toml", "tokio-stream/src/macros.rs", "tokio-stream/src/wrappers.rs", "tokio-stream/src/wrappers/task.rs", "tokio-stream/tests/join_set_stream.rs" ]
[ { "comment": "Please add some tests to https://github.com/tokio-rs/tokio/tree/master/tokio-stream/tests too.", "path": "tokio-stream/src/wrappers/task.rs", "hunk": "@@ -0,0 +1,80 @@\n+use crate::Stream;\n+use core::future::Future;\n+use core::pin::pin;\n+use std::pin::Pin;\n+use std::task::{Context, Pol...
diff --git a/tokio-stream/tests/join_set_stream.rs b/tokio-stream/tests/join_set_stream.rs new file mode 100644 index 00000000000..f9ebf0a5632 --- /dev/null +++ b/tokio-stream/tests/join_set_stream.rs @@ -0,0 +1,39 @@ +#![cfg(feature = "rt")] + +use futures::{Stream, StreamExt}; +use std::collections::HashSet; +use tok...
true
tokio-rs/tokio
8,189
comment_to_fix
tokio-stream: add `Stream` wrapper for `JoinSet`
Please add some tests to https://github.com/tokio-rs/tokio/tree/master/tokio-stream/tests too.
778e9d97d91cff2c3036cc5663936d479edb30cb
ebbdf4f0f8dfb0025588ccd53491f99ca3c1eef9
diff --git a/tokio-stream/src/wrappers/task.rs b/tokio-stream/src/wrappers/task.rs new file mode 100644 index 00000000000..d844a38a501 --- /dev/null +++ b/tokio-stream/src/wrappers/task.rs @@ -0,0 +1,78 @@ +use crate::Stream; +use std::pin::Pin; +use std::task::{Context, Poll}; +use tokio::task::{JoinError, JoinSet}; +...
[ "tokio-stream/src/wrappers/task.rs" ]
[ { "comment": "Please add some tests to https://github.com/tokio-rs/tokio/tree/master/tokio-stream/tests too.", "path": "tokio-stream/src/wrappers/task.rs", "hunk": "@@ -0,0 +1,80 @@\n+use crate::Stream;\n+use core::future::Future;\n+use core::pin::pin;\n+use std::pin::Pin;\n+use std::task::{Context, Pol...
true
tokio-rs/tokio
8,189
comment_to_fix
tokio-stream: add `Stream` wrapper for `JoinSet`
The JoinSet may be extended further during its lifetime. I am not sure we should return the upper bound here.
778e9d97d91cff2c3036cc5663936d479edb30cb
ebbdf4f0f8dfb0025588ccd53491f99ca3c1eef9
diff --git a/tokio-stream/src/wrappers/task.rs b/tokio-stream/src/wrappers/task.rs new file mode 100644 index 00000000000..d844a38a501 --- /dev/null +++ b/tokio-stream/src/wrappers/task.rs @@ -0,0 +1,78 @@ +use crate::Stream; +use std::pin::Pin; +use std::task::{Context, Poll}; +use tokio::task::{JoinError, JoinSet}; +...
[ "tokio-stream/src/wrappers/task.rs" ]
[ { "comment": "The JoinSet may be extended further during its lifetime. I am not sure we should return the upper bound here.", "path": "tokio-stream/src/wrappers/task.rs", "hunk": "@@ -0,0 +1,80 @@\n+use crate::Stream;\n+use core::future::Future;\n+use core::pin::pin;\n+use std::pin::Pin;\n+use std::task...
true
tokio-rs/tokio
8,192
issue_to_patch
tokio s390x support for taskdump
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/tokio/blob/master/CONTRIBUTING.md The contributors guide includes instructions for running rustfmt and b...
2e7930fe58cdf29671ea71a066ebc80b5006b97d
0d75a334ce3802a45af43078e0663d5d01bbae52
diff --git a/examples/dump.rs b/examples/dump.rs index 2211e3ed434..b6821f1cb5f 100644 --- a/examples/dump.rs +++ b/examples/dump.rs @@ -5,7 +5,12 @@ #[cfg(all( tokio_unstable, target_os = "linux", - any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") + any( + target_arch =...
[ "examples/dump.rs", "tokio/src/lib.rs", "tokio/src/macros/cfg.rs", "tokio/src/runtime/context.rs", "tokio/src/runtime/handle.rs", "tokio/src/runtime/local_runtime/runtime.rs", "tokio/src/runtime/runtime.rs", "tokio/src/runtime/scheduler/current_thread/mod.rs", "tokio/src/runtime/task/mod.rs", "tok...
[ { "comment": "```suggestion\n /// Task dumps are supported on Linux atop `aarch64`, `x86`, `x86_64` and `s390x`.\n```", "path": "tokio/src/runtime/handle.rs", "hunk": "", "resolving_sha": "0d75a334ce3802a45af43078e0663d5d01bbae52", "resolving_diff": "diff --git a/tokio/src/runtime/handle....
diff --git a/tokio/tests/dump.rs b/tokio/tests/dump.rs index 56aab8f2bc5..e9d095652d3 100644 --- a/tokio/tests/dump.rs +++ b/tokio/tests/dump.rs @@ -2,7 +2,12 @@ tokio_unstable, feature = "taskdump", target_os = "linux", - any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") + ...
true
tokio-rs/tokio
8,196
issue_to_patch
`shutdown_after_tcp_reset` observed to fail on FreeBSD The following spurious CI failure was observed on the FreeBSD x86_64 job on the tokio-1.47.x LTS branch. ``` test shutdown_after_tcp_reset ... FAILED failures: ---- shutdown_after_tcp_reset stdout ---- thread 'shutdown_after_tcp_reset' (131856) panicked at toki...
net: accept ConnectionReset in shutdown_after_tcp_reset test
The `shutdown_after_tcp_reset` test asserts `shutdown()` returns `Ok(())` after the peer resets the connection (`linger = 0`). This holds on Linux and macOS, but on FreeBSD the kernel can finish processing the RST before `shutdown()` runs, so it returns `ConnectionReset` and the test fails intermittently — the oneshot ...
778e9d97d91cff2c3036cc5663936d479edb30cb
6de149f398de41eb46fc0ecb5fa69864adf5a4ae
[ "tokio/tests/tcp_shutdown.rs" ]
[]
diff --git a/tokio/tests/tcp_shutdown.rs b/tokio/tests/tcp_shutdown.rs index aaac41a93e2..697512cc1cb 100644 --- a/tokio/tests/tcp_shutdown.rs +++ b/tokio/tests/tcp_shutdown.rs @@ -44,7 +44,16 @@ async fn shutdown_after_tcp_reset() { connected_tx.send(()).unwrap(); dropped_rx.await.unwrap(); - ...
true
tokio-rs/tokio
8,193
issue_to_patch
Documentation: clarify tokio::main macro de-asyncs the function **Version** 1.24.1 features full, but the issue concerns the documentation on docs.rs/tokio/latest **Description** For my tokio entry point, I am using the `#[tokio::main]` helper macro. I struggled adding it however because **tokio::main must be a...
macros: clarify `tokio::main` expansion
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/tokio/blob/master/CONTRIBUTING.md The contributors guide includes instructions for running rustfmt and b...
778e9d97d91cff2c3036cc5663936d479edb30cb
7a7dc2f76afe49405ea840b39ec27cf9b7c9df1e
diff --git a/tokio-macros/src/lib.rs b/tokio-macros/src/lib.rs index 3b4f46c76bd..e3791b72ff9 100644 --- a/tokio-macros/src/lib.rs +++ b/tokio-macros/src/lib.rs @@ -29,10 +29,11 @@ use proc_macro::TokenStream; /// powerful interface. /// /// Note: This macro can be used on any function and not just the `main` -/// f...
[ "tokio-macros/src/lib.rs" ]
[]
true
tokio-rs/tokio
8,186
issue_to_patch
docs: fix typo in io_uring test support
> **Dear maintainer** — AI-authored PR by **Composer** under [@adv0r](https://github.com/adv0r). Methodology + [opt-out](https://github.com/adv0r/tokens-for-good/blob/main/MAINTAINER_REMOVAL.md) at [tokens-for-good](https://github.com/adv0r/tokens-for-good). > A one-line "no thanks" → auto-apology + auto-close + perman...
71362aa609955d9dfce742f81773a5dc6b2a760c
d5a06e116ebf89d014ace3c1c2e05277ec1c5009
[ "tokio/tests/support/io_uring.rs" ]
[]
diff --git a/tokio/tests/support/io_uring.rs b/tokio/tests/support/io_uring.rs index affb2f833be..35427ffd5b3 100644 --- a/tokio/tests/support/io_uring.rs +++ b/tokio/tests/support/io_uring.rs @@ -10,7 +10,7 @@ use io_uring::IoUring; // Currently, we are running some of the tests on Kernels where io_uring is not sup...
true
tokio-rs/tokio
8,144
issue_to_patch
net: add `SocketAddr` methods to Unix sockets
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/tokio/blob/master/CONTRIBUTING.md The contributors guide includes instructions for running rustfmt and b...
32312ae0d6f0b1c6457f1323e3e7f568f448d0db
b879254d31278eae836440ce6b2ff0ce6f359adf
diff --git a/tokio/src/net/unix/listener.rs b/tokio/src/net/unix/listener.rs index b18e6611184..d4e362f07a0 100644 --- a/tokio/src/net/unix/listener.rs +++ b/tokio/src/net/unix/listener.rs @@ -90,7 +90,23 @@ impl UnixListener { #[cfg(not(any(target_os = "linux", target_os = "android")))] let addr = St...
[ "tokio/src/net/unix/listener.rs", "tokio/src/net/unix/stream.rs", "tokio/tests/uds_stream.rs" ]
[ { "comment": "`UnixStream::new()` calls `PollEvented::new()`, which calls `Registration::new_with_interest_and_handle()` that also needs IO enabled.\nPlease add the same `# Panics` as for `bind_addr()` above", "path": "tokio/src/net/unix/stream.rs", "hunk": "@@ -86,7 +86,17 @@ impl UnixStream {\n ...
diff --git a/tokio/tests/uds_stream.rs b/tokio/tests/uds_stream.rs index c85ed7bd79f..13cd671155a 100644 --- a/tokio/tests/uds_stream.rs +++ b/tokio/tests/uds_stream.rs @@ -8,6 +8,7 @@ use std::io; use std::os::android::net::SocketAddrExt; #[cfg(target_os = "linux")] use std::os::linux::net::SocketAddrExt; +use std:...
true
tokio-rs/tokio
8,144
comment_to_fix
net: add `SocketAddr` methods to Unix sockets
`UnixStream::new()` calls `PollEvented::new()`, which calls `Registration::new_with_interest_and_handle()` that also needs IO enabled. Please add the same `# Panics` as for `bind_addr()` above
32312ae0d6f0b1c6457f1323e3e7f568f448d0db
b879254d31278eae836440ce6b2ff0ce6f359adf
diff --git a/tokio/src/net/unix/stream.rs b/tokio/src/net/unix/stream.rs index 814efa5edf4..071ebad7f70 100644 --- a/tokio/src/net/unix/stream.rs +++ b/tokio/src/net/unix/stream.rs @@ -69,6 +69,15 @@ impl UnixStream { /// This function will create a new Unix socket and connect to the path /// specified, assoc...
[ "tokio/src/net/unix/stream.rs" ]
[ { "comment": "`UnixStream::new()` calls `PollEvented::new()`, which calls `Registration::new_with_interest_and_handle()` that also needs IO enabled.\nPlease add the same `# Panics` as for `bind_addr()` above", "path": "tokio/src/net/unix/stream.rs", "hunk": "@@ -86,7 +86,17 @@ impl UnixStream {\n ...
true
tokio-rs/tokio
8,144
comment_to_fix
net: add `SocketAddr` methods to Unix sockets
Why is this `&SocketAddr` rather than just `SocketAddr`? Isn't this type copy?
32312ae0d6f0b1c6457f1323e3e7f568f448d0db
b879254d31278eae836440ce6b2ff0ce6f359adf
diff --git a/tokio/src/net/unix/listener.rs b/tokio/src/net/unix/listener.rs index b18e6611184..d4e362f07a0 100644 --- a/tokio/src/net/unix/listener.rs +++ b/tokio/src/net/unix/listener.rs @@ -90,7 +90,23 @@ impl UnixListener { #[cfg(not(any(target_os = "linux", target_os = "android")))] let addr = St...
[ "tokio/src/net/unix/listener.rs" ]
[ { "comment": "Why is this `&SocketAddr` rather than just `SocketAddr`? Isn't this type copy?", "path": "tokio/src/net/unix/listener.rs", "hunk": "@@ -90,7 +90,23 @@ impl UnixListener {\n #[cfg(not(any(target_os = \"linux\", target_os = \"android\")))]\n let addr = StdSocketAddr::from_pat...
true
tokio-rs/tokio
8,141
issue_to_patch
codec: use libc::memchr for LinesCodec delimiter scan
## Summary (v2) Updated after review. The previous revision pulled in the `memchr` crate; per @Darksonn's feedback that's not happening, and my claim that `memchr` was already transitive via `tokio`/`bytes` was wrong (`cargo tree -p tokio-util -e normal` confirms it's not in any normal dep tree). Apologies for the bad...
c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17
ab6d7232926b2651e06113e6e8f233c7a2cb21e6
diff --git a/tokio-util/Cargo.toml b/tokio-util/Cargo.toml index 84cb3cd225c..24392c7cba1 100644 --- a/tokio-util/Cargo.toml +++ b/tokio-util/Cargo.toml @@ -25,7 +25,7 @@ full = ["codec", "compat", "io-util", "time", "net", "rt", "join-map"] net = ["tokio/net"] compat = ["futures-io"] -codec = [] +codec = ["libc"] ...
[ "tokio-util/Cargo.toml", "tokio-util/src/codec/lines_codec.rs", "tokio-util/src/util/memchr.rs", "tokio-util/src/util/mod.rs" ]
[ { "comment": "```suggestion\n [d0, d1, d2] => memchr::memchr3(*d0, *d1, *d2, haystack),\n [d0, d1, d2, d3] => match (memchr::memchr3(*d0, *d1, *d2, haystack), memchr::memchr(*d3, haystack)) {\n (Some(i1), Some(i2)) => Some(cmp::min(i1, i2)),\n ...
true
tokio-rs/tokio
6,421
issue_to_patch
Adding support for QNX OS
This enables tokio to be used on QNX. It also depends on https://github.com/tokio-rs/mio/pull/1766 @AkhilTThomas I added you to the fork, so you can write there as well The changes are rather trivial, the main thing is a i32/u32 type mismatch that is handled Not so sure what is expected/can done in terms o...
6fcd9c02176bf3cd570bc7de88edaa3b95ea480a
f4adc34215c7fc625c1c54004b78e450829d69c0
diff --git a/tokio/src/net/unix/ucred.rs b/tokio/src/net/unix/ucred.rs index 3390819160a..bcd1c755f6a 100644 --- a/tokio/src/net/unix/ucred.rs +++ b/tokio/src/net/unix/ucred.rs @@ -39,7 +39,7 @@ impl UCred { ))] pub(crate) use self::impl_linux::get_peer_cred; -#[cfg(target_os = "netbsd")] +#[cfg(any(target_os = "ne...
[ "tokio/src/net/unix/ucred.rs", "tokio/src/process/mod.rs" ]
[ { "comment": "```suggestion\r\n #[cfg(target_os = \"nto\")]\r\n let id = id as i32;\r\n self.std.uid(id);\r\n```", "path": "tokio/src/process/mod.rs", "hunk": "@@ -672,6 +672,9 @@ impl Command {\n #[cfg(unix)]\n #[cfg_attr(docsrs, doc(cfg(unix)))]\n pub fn uid(&mut self,...
true
tokio-rs/tokio
6,421
comment_to_fix
Adding support for QNX OS
```suggestion #[cfg(target_os = "nto")] let id = id as i32; self.std.gid(id); ```
6fcd9c02176bf3cd570bc7de88edaa3b95ea480a
f4adc34215c7fc625c1c54004b78e450829d69c0
diff --git a/tokio/src/process/mod.rs b/tokio/src/process/mod.rs index 0fad67cd01a..fc661d89c1f 100644 --- a/tokio/src/process/mod.rs +++ b/tokio/src/process/mod.rs @@ -672,6 +672,8 @@ impl Command { #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn uid(&mut self, id: u32) -> &mut Command { + ...
[ "tokio/src/process/mod.rs" ]
[ { "comment": "```suggestion\r\n #[cfg(target_os = \"nto\")]\r\n let id = id as i32;\r\n self.std.gid(id);\r\n```", "path": "tokio/src/process/mod.rs", "hunk": "@@ -681,6 +683,9 @@ impl Command {\n #[cfg(unix)]\n #[cfg_attr(docsrs, doc(cfg(unix)))]\n pub fn gid(&mut self,...
true
tokio-rs/tokio
8,099
issue_to_patch
task: add `JoinMap::try_join_next`
## Motivation `tokio_util::task::JoinMap` is a key-tracking wrapper around `JoinSet`. The underlying `JoinSet` exposes both `join_next` and `try_join_next`, but `JoinMap` only forwards the async `join_next`. That asymmetry forces callers who need to drain completed tasks from a synchronous context — e.g. a non-async `...
02ff0833e00adeb8cd451420f586f968deb70f78
b86c69bfb167649bfd384cf8bdc63fa0c12931c9
diff --git a/tokio-util/src/task/join_map.rs b/tokio-util/src/task/join_map.rs index 49c1925373e..027470257e6 100644 --- a/tokio-util/src/task/join_map.rs +++ b/tokio-util/src/task/join_map.rs @@ -446,7 +446,7 @@ where /// * `Some((key, Ok(value)))` if one of the tasks in this `JoinMap` has /// completed....
[ "tokio-util/src/task/join_map.rs", "tokio-util/tests/task_join_map.rs" ]
[ { "comment": "This check fails when the task with the given id has been replaced by a new task with that id (see `fn insert`). Please include a test that triggers this case and goes around the loop.", "path": "tokio-util/src/task/join_map.rs", "hunk": "@@ -468,6 +468,60 @@ where\n }\n }\n \n...
diff --git a/tokio-util/tests/task_join_map.rs b/tokio-util/tests/task_join_map.rs index 70c33d8a94a..0748fb8669d 100644 --- a/tokio-util/tests/task_join_map.rs +++ b/tokio-util/tests/task_join_map.rs @@ -358,6 +358,131 @@ async fn abort_all() { } } +#[tokio::test] +async fn try_join_next_empty() { + let mut...
true
tokio-rs/tokio
8,099
comment_to_fix
task: add `JoinMap::try_join_next`
This check fails when the task with the given id has been replaced by a new task with that id (see `fn insert`). Please include a test that triggers this case and goes around the loop.
02ff0833e00adeb8cd451420f586f968deb70f78
b86c69bfb167649bfd384cf8bdc63fa0c12931c9
diff --git a/tokio-util/src/task/join_map.rs b/tokio-util/src/task/join_map.rs index 49c1925373e..027470257e6 100644 --- a/tokio-util/src/task/join_map.rs +++ b/tokio-util/src/task/join_map.rs @@ -446,7 +446,7 @@ where /// * `Some((key, Ok(value)))` if one of the tasks in this `JoinMap` has /// completed....
[ "tokio-util/src/task/join_map.rs" ]
[ { "comment": "This check fails when the task with the given id has been replaced by a new task with that id (see `fn insert`). Please include a test that triggers this case and goes around the loop.", "path": "tokio-util/src/task/join_map.rs", "hunk": "@@ -468,6 +468,60 @@ where\n }\n }\n \n...
true
tokio-rs/tokio
8,099
comment_to_fix
task: add `JoinMap::try_join_next`
Wrap in a loop ?! To make the test more stable. The other tests do it and the method docstring recommends it.
02ff0833e00adeb8cd451420f586f968deb70f78
b86c69bfb167649bfd384cf8bdc63fa0c12931c9
diff --git a/tokio-util/tests/task_join_map.rs b/tokio-util/tests/task_join_map.rs index 70c33d8a94a..0748fb8669d 100644 --- a/tokio-util/tests/task_join_map.rs +++ b/tokio-util/tests/task_join_map.rs @@ -358,6 +358,131 @@ async fn abort_all() { } } +#[tokio::test] +async fn try_join_next_empty() { + let mut...
[ "tokio-util/tests/task_join_map.rs" ]
[ { "comment": "Wrap in a loop ?! To make the test more stable.\nThe other tests do it and the method docstring recommends it.", "path": "tokio-util/tests/task_join_map.rs", "hunk": "@@ -358,6 +358,131 @@ async fn abort_all() {\n }\n }\n \n+#[tokio::test]\n+async fn try_join_next_empty() {\n+ let m...
true
tokio-rs/tokio
8,099
comment_to_fix
task: add `JoinMap::try_join_next`
```suggestion /// * `Some((key, Err(err)))` if one of the tasks in this `JoinMap` has ```
02ff0833e00adeb8cd451420f586f968deb70f78
b86c69bfb167649bfd384cf8bdc63fa0c12931c9
diff --git a/tokio-util/src/task/join_map.rs b/tokio-util/src/task/join_map.rs index 49c1925373e..027470257e6 100644 --- a/tokio-util/src/task/join_map.rs +++ b/tokio-util/src/task/join_map.rs @@ -446,7 +446,7 @@ where /// * `Some((key, Ok(value)))` if one of the tasks in this `JoinMap` has /// completed....
[ "tokio-util/src/task/join_map.rs" ]
[ { "comment": "```suggestion\n /// * `Some((key, Err(err)))` if one of the tasks in this `JoinMap` has\n```", "path": "tokio-util/src/task/join_map.rs", "hunk": "", "resolving_sha": "b86c69bfb167649bfd384cf8bdc63fa0c12931c9", "resolving_diff": "diff --git a/tokio-util/src/task/join_map.rs b/t...
true
tokio-rs/tokio
8,149
issue_to_patch
docs: tokio::fs::create_dir_all() specify if path existing is an error As in the title. `create_dir()` clearly states that `path` existing causes an error. `create_dir_all()` does not specify that this is an error, but it also does not specify that it's *not* an error. Nor is it mentioned as a platform-specific behavi...
docs(fs): clarify create_dir_all succeeds if path exists
Fixes #7424
c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17
4973df33e6239f4c55cdb6fcc9ae6c3f9760191e
diff --git a/tokio/src/fs/create_dir_all.rs b/tokio/src/fs/create_dir_all.rs index 1256469b500..ce9e46f943f 100644 --- a/tokio/src/fs/create_dir_all.rs +++ b/tokio/src/fs/create_dir_all.rs @@ -26,6 +26,9 @@ use std::path::Path; /// when a directory is being created (after it is determined to not exist) are /// ou...
[ "tokio/src/fs/create_dir_all.rs" ]
[ { "comment": "I was thinking if we should specify that this behavior might depend from the platform (sorry, ignore my previous comment)", "path": "tokio/src/fs/create_dir_all.rs", "hunk": "@@ -26,6 +26,9 @@ use std::path::Path;\n /// when a directory is being created (after it is determined to not exi...
true