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
yewstack/yew
4,143
issue_to_patch
chore(deps): bump rustls-webpki from 0.103.10 to 0.103.13
Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.103.10 to 0.103.13. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/rustls/webpki/releases">rustls-webpki's releases</a>.</em></p> <blockquote> <h2>0.103.13</h2> <ul> <li><strong>Fix reachable panic in parsing a CR...
40219519f5be6051b3545fbae12c14851c680fad
e32ce33d326dcde2f8d3ef577fda78ce94b4caeb
diff --git a/Cargo.lock b/Cargo.lock index 933ae34a456..83793809cde 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3459,9 +3459,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.10" +version = "0.103.13" source = "registry+https://...
[ "Cargo.lock" ]
[]
true
yewstack/yew
3,991
issue_to_patch
Calling `suspense::use_future` makes children `use_effect` hooks execution inconsistent. **Problem** _EDIT_: This initially mentioned the `leaflet` library, but upon testing more, I ended up minimizing the example even further and getting rid of `leaflet` while still getting inconsistencies with `suspense::use_future...
fix inconsistent effects for suspended nodes
#### Description Fixes #3780 This PR gives a single atomic transition for every `<Suspense>` boundary: no child effect inside it observes the DOM until the boundary is fully un-suspended and the DOM is live. Opus 4.7's research on React source code: React arrives at the same invariant by a different route. ...
28219ae16e748a0511d79855b701d365bf122ad3
4dcca09b2b89c88592031d650fdf983be13cfbc5
diff --git a/packages/yew/src/html/component/lifecycle.rs b/packages/yew/src/html/component/lifecycle.rs index 655f1a2a15b..4452cbbc57f 100644 --- a/packages/yew/src/html/component/lifecycle.rs +++ b/packages/yew/src/html/component/lifecycle.rs @@ -487,6 +487,8 @@ impl ComponentState { fn commit_render(&mut self, ...
[ "packages/yew/src/html/component/lifecycle.rs", "packages/yew/src/html/component/mod.rs", "packages/yew/src/suspense/component.rs", "packages/yew/tests/suspense.rs" ]
[]
diff --git a/packages/yew/tests/suspense.rs b/packages/yew/tests/suspense.rs index f75b909b6f1..2c80b549e3c 100644 --- a/packages/yew/tests/suspense.rs +++ b/packages/yew/tests/suspense.rs @@ -816,3 +816,169 @@ async fn test_duplicate_suspension() { let result = obtain_result(); assert_eq!(result.as_str(), "h...
true
yewstack/yew
4,139
issue_to_patch
fix(website): unversion migration guides
#### Description Migration guides were duplicated across every versioned docs directory (`versioned_docs/version-0.20/migration-guides` through `version-0.23/migration-guides`, plus `docs/migration-guides`), and the copies were identical. Moving from 0.21 to 0.22 is the same instruction regardless of which docs vers...
b814bf6633e2437768051ea153cb51aa21372d04
cba0b4c5839b5a02099c1831ca945a472ba50512
diff --git a/CHANGELOG.md b/CHANGELOG.md index b27efbcd046..337dd72d7c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -[Link to all migration guides](https://yew.rs/docs/category/migration-guides) +[Link to all migration guides](https://yew.rs/docs/migration-guides) ## ✨ yew **0.23.0** ...
[ "CHANGELOG.md", "website/blog/2025-11-29-release-0-22.md", "website/docusaurus.config.js", "website/i18n/ja/docusaurus-plugin-content-docs-migration-guides/current.json", "website/i18n/ja/docusaurus-plugin-content-docs-migration-guides/current/yew-agent/from-0_4_0-to-0_5_0.mdx", "website/i18n/ja/docusauru...
[]
true
yewstack/yew
4,140
issue_to_patch
chore(yew-macro): remove orphan html-component-fail.stderr
The matching `.rs` file was deleted in #1738, but the `.stderr` was left behind. The trybuild glob in html_macro_test.rs only picks up `*-pass.rs`/`*-fail.rs`, so this file was never consumed.
b814bf6633e2437768051ea153cb51aa21372d04
802e97f5a04c0b483d937484ada5fa3157ff4a75
[ "packages/yew-macro/tests/html_macro/html-component-fail.stderr" ]
[]
diff --git a/packages/yew-macro/tests/html_macro/html-component-fail.stderr b/packages/yew-macro/tests/html_macro/html-component-fail.stderr deleted file mode 100644 index 7c2e2f46400..00000000000 --- a/packages/yew-macro/tests/html_macro/html-component-fail.stderr +++ /dev/null @@ -1,371 +0,0 @@ -error: this opening t...
true
yewstack/yew
4,138
issue_to_patch
Trunk link pointing to a parked domain This is about: - [ ] A typo - [ ] Inaccurate/misleading documentation (e.g. technically incorrect advice) - [ ] Undocumented code - [ ] Outdated documentation - [x] Other **Problem** The link to the Trunk website on the [Getting Started](https://yew.rs/docs/getting-started/intr...
fix: correct trunk urls - now hosted on github.io
#### Description Fixes #4137
e163df06b6ab82768c9ab17b509b76e46b0aa992
b197bb9ac83e9ccb3b60ce1a788091f6cc446c1a
diff --git a/website/docs/getting-started/introduction.mdx b/website/docs/getting-started/introduction.mdx index 788f87a90bc..0abcff7df0a 100644 --- a/website/docs/getting-started/introduction.mdx +++ b/website/docs/getting-started/introduction.mdx @@ -3,7 +3,7 @@ title: 'Getting Started' --- You will need a couple...
[ "website/docs/getting-started/introduction.mdx", "website/i18n/ja/docusaurus-plugin-content-docs/current/getting-started/introduction.mdx", "website/i18n/ja/docusaurus-plugin-content-docs/version-0.22/getting-started/introduction.mdx", "website/i18n/ja/docusaurus-plugin-content-docs/version-0.23/getting-start...
[]
true
yewstack/yew
4,088
issue_to_patch
perf: avoid Rc refcount overhead in DomSlot chain traversal
This addresses a TODO left by @WorldSEnder `with_next_sibling` is called on every `DomSlot::insert`, which backs every DOM node insertion. For a `BList` of N component children processed right-to-left, the total chain hops across all insertions is 1 + 2 + ... + N = O(N^2). Reducing the constant factor per hop dir...
979ad6cb40d099fb786d4d719e0bf02cd450b6ed
75d12662324dcb8f7bb06bd55d36bfff2484564a
diff --git a/packages/yew/src/dom_bundle/position.rs b/packages/yew/src/dom_bundle/position.rs index bc5de0e50fa..8c64b91f048 100644 --- a/packages/yew/src/dom_bundle/position.rs +++ b/packages/yew/src/dom_bundle/position.rs @@ -191,23 +191,40 @@ impl DynamicDomSlot { } fn with_next_sibling<R>(&self, f: imp...
[ "packages/yew/src/dom_bundle/position.rs" ]
[ { "comment": "Calling the arbitrary function `f` invalidates the safety claim made above, since this `f` can indeed - in theory - access any node on the chain by capturing a reference to any of the Rc's therein.\r\n\r\nDon't get me wrong, I don't immediately see any code doing this in this file. In practice, we...
true
yewstack/yew
4,088
comment_to_fix
perf: avoid Rc refcount overhead in DomSlot chain traversal
Calling the arbitrary function `f` invalidates the safety claim made above, since this `f` can indeed - in theory - access any node on the chain by capturing a reference to any of the Rc's therein. Don't get me wrong, I don't immediately see any code doing this in this file. In practice, we do call `gloo::console::e...
979ad6cb40d099fb786d4d719e0bf02cd450b6ed
75d12662324dcb8f7bb06bd55d36bfff2484564a
diff --git a/packages/yew/src/dom_bundle/position.rs b/packages/yew/src/dom_bundle/position.rs index bc5de0e50fa..8c64b91f048 100644 --- a/packages/yew/src/dom_bundle/position.rs +++ b/packages/yew/src/dom_bundle/position.rs @@ -191,23 +191,40 @@ impl DynamicDomSlot { } fn with_next_sibling<R>(&self, f: imp...
[ "packages/yew/src/dom_bundle/position.rs" ]
[ { "comment": "Calling the arbitrary function `f` invalidates the safety claim made above, since this `f` can indeed - in theory - access any node on the chain by capturing a reference to any of the Rc's therein.\r\n\r\nDon't get me wrong, I don't immediately see any code doing this in this file. In practice, we...
true
yewstack/yew
4,136
issue_to_patch
Do not emit hard errors for deprecated html macro patterns A consensus in #4128 is we shouldn't make deprecated html patterns hard errors. Ideally we should emit warnings and provide a way for users to disable them for any scope (a function, a module, a expression)
fix: soften html style recommendations from errors on stable to warnings by injecting deprecated functions
#### Description Closes #4129 idea first proposed by @its-the-shrimp #### Checklist - [x] I have reviewed my own code - [x] I have added tests
979ad6cb40d099fb786d4d719e0bf02cd450b6ed
42c68ec61ad1857ea0a4af55b744683266965b03
diff --git a/Cargo.lock b/Cargo.lock index a0755cc49ce..933ae34a456 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5302,7 +5302,6 @@ dependencies = [ "rustversion", "syn 2.0.117", "trybuild", - "version_check", "yew", ] diff --git a/Cargo.toml b/Cargo.toml index 7364b8c8638..05b3cf7a5c1 100644 --- a/Cargo.toml...
[ "Cargo.lock", "Cargo.toml", "packages/yew-macro/Cargo.toml", "packages/yew-macro/build.rs", "packages/yew-macro/src/html_tree/html_block.rs", "packages/yew-macro/src/html_tree/html_for.rs", "packages/yew-macro/src/html_tree/html_match.rs", "packages/yew-macro/src/html_tree/mod.rs", "packages/yew-mac...
[ { "comment": "Just to make sure: this does not break IDE completions, right?. We want to continue to expand the macro to the best of our ability even if it is going to fail rust compilation. I see some errors being removed from tests and that concerns me.\n\nSee https://github.com/yewstack/yew/pull/2972 ", ...
diff --git a/packages/yew-macro/tests/html_deprecation/fail.rs b/packages/yew-macro/tests/html_deprecation/fail.rs new file mode 100644 index 00000000000..88871e3c16e --- /dev/null +++ b/packages/yew-macro/tests/html_deprecation/fail.rs @@ -0,0 +1,93 @@ +use yew::prelude::*; + +fn root_level_fragment() { + let _ = h...
true
yewstack/yew
4,136
comment_to_fix
fix: soften html style recommendations from errors on stable to warnings by injecting deprecated functions
Just to make sure: this does not break IDE completions, right?. We want to continue to expand the macro to the best of our ability even if it is going to fail rust compilation. I see some errors being removed from tests and that concerns me. See https://github.com/yewstack/yew/pull/2972
979ad6cb40d099fb786d4d719e0bf02cd450b6ed
42c68ec61ad1857ea0a4af55b744683266965b03
diff --git a/packages/yew-macro/src/html_tree/html_block.rs b/packages/yew-macro/src/html_tree/html_block.rs index dd63ff301b2..9bcf715528c 100644 --- a/packages/yew-macro/src/html_tree/html_block.rs +++ b/packages/yew-macro/src/html_tree/html_block.rs @@ -1,4 +1,4 @@ -use proc_macro2::Delimiter; +use proc_macro2::{Del...
[ "packages/yew-macro/src/html_tree/html_block.rs" ]
[ { "comment": "Just to make sure: this does not break IDE completions, right?. We want to continue to expand the macro to the best of our ability even if it is going to fail rust compilation. I see some errors being removed from tests and that concerns me.\n\nSee https://github.com/yewstack/yew/pull/2972 ", ...
true
yewstack/yew
4,135
issue_to_patch
Refactor ternary operator workarounds with GitHub Action's new `case` function our workflow has a bunch of these workarounds
refactor(ci): use GitHub's case function
Fixes #4123
5b7cd87ec7ade9abc158b82084dc066a5291b6db
a763d240853ca3be579cea1e6076eae2cd53afcf
diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index 6f2f9fb8dc9..c7514f9a79f 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -139,9 +139,7 @@ jobs: - name: Run native tests env: - # workaround for lack of ternary o...
[ ".github/workflows/main-checks.yml" ]
[]
true
yewstack/yew
4,133
issue_to_patch
codeblocks on the SSR page don't hide lines correctly This is about: - [ ] A typo - [ ] Inaccurate/misleading documentation (e.g. technically incorrect advice) - [ ] Undocumented code - [ ] Outdated documentation - [x] Other **Problem** `https://yew.rs/docs/next/advanced-topics/server-side-rendering` <img width="7...
fix(website): strip rustdoc `# ` hidden lines in Docusaurus code blocks
#### Description fixes #4132 An item in #2312 I looked at the extensible magic-comment approach and found a custom plugin might work better. The `#` syntax is more familiar to rust devs. This is also less dom weight as the magic-comment approach can hides the code with `display: none` but the custom pl...
9d3e9ba0836b4a7adb7251d57af8789a67cdec68
02bce490a5ccb6c02e05a51a560d69f6c0741575
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 7b94080541d..ea2539f0420 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -1,4 +1,5 @@ const { API_BUTTON } = require('./src/constants') +const rustDocHiddenLines = require('./src/remark/rustDocHiddenLines') ...
[ "website/docusaurus.config.js", "website/src/remark/rustDocHiddenLines.js" ]
[]
true
yewstack/yew
4,027
issue_to_patch
Send states created during SSR alongside SSR artifact to be used with client-side rendering hydration This issue outlines a proposal to add a set of hooks that can be used to carry states / artifacts created during the server-side rendering to the client side for hydration and subsequent rendering and a new crate that...
feat: add yew-link crate for unified SSR/CSR data fetching
#### Description Closes #2649, whose lower-level half including`use_prepared_state` and `use_transitive_state` is already shipped This PR implements the higher-level half of #2649: a `yew-link` crate that unifies SSR, hydration, and client-side data fetching behind a single hook. The mentioned lower-level hooks ...
2142c5ce9c405622ed164cbfb93d80ce76972e0e
67c54e231ddcc966cf33b09a71a51f29a6faccb9
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index f25d21553c7..f92fb776be2 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -50,7 +50,7 @@ jobs: TARGET_FLAGS: ${{ case(matrix.target == 'wasm32', '--target wasm32-unknown-unknown', null) }} r...
[ ".github/workflows/clippy.yml", ".github/workflows/main-checks.yml", ".github/workflows/test-website.yml", ".gitignore", "Cargo.lock", "Cargo.toml", "examples/README.md", "examples/actix_ssr_router/Cargo.toml", "examples/actix_ssr_router/README.md", "examples/actix_ssr_router/index.html", "examp...
[ { "comment": "these flush turned out to be very neccessary. Without them the ssr tests fails.\n\nWhen .click() fires on the <a> element, yew's event delegation hasn't processed it yet (scheduler is deferred to the microtask queue). So the browser's default anchor behavior kicks in - it performs a real navigatio...
diff --git a/examples/actix_ssr_router/tests/e2e.rs b/examples/actix_ssr_router/tests/e2e.rs new file mode 100644 index 00000000000..24383f585db --- /dev/null +++ b/examples/actix_ssr_router/tests/e2e.rs @@ -0,0 +1,31 @@ +#![cfg(all(target_arch = "wasm32", not(target_os = "wasi")))] + +use actix_ssr_router::{App, AppPr...
true
yewstack/yew
4,027
comment_to_fix
feat: add yew-link crate for unified SSR/CSR data fetching
`std::any::type_name::<T>()` is used as the wire-format dispatch key between client and server (here for server registration, lines below for client requests). yew-link has it has a single `/api/link` endpoint with a Resolver registry on the server. The client sends `{ type_name: "myapp::Post", input: ... }` and th...
2142c5ce9c405622ed164cbfb93d80ce76972e0e
67c54e231ddcc966cf33b09a71a51f29a6faccb9
diff --git a/packages/yew-link/src/lib.rs b/packages/yew-link/src/lib.rs new file mode 100644 index 00000000000..2938d577826 --- /dev/null +++ b/packages/yew-link/src/lib.rs @@ -0,0 +1,684 @@ +use std::any::{Any, TypeId}; +use std::cell::RefCell; +use std::collections::HashMap; +#[cfg(target_arch = "wasm32")] +use std:...
[ "packages/yew-link/src/lib.rs" ]
[ { "comment": "`std::any::type_name::<T>()` is used as the wire-format dispatch key between client and server (here for server registration, lines below for client requests). \r\n\r\nyew-link has it has a single `/api/link` endpoint with a Resolver registry on the server. The client sends `{ type_name: \"myapp::...
true
yewstack/yew
4,027
comment_to_fix
feat: add yew-link crate for unified SSR/CSR data fetching
see other comment about std::any::type_name. This is the client side code
2142c5ce9c405622ed164cbfb93d80ce76972e0e
67c54e231ddcc966cf33b09a71a51f29a6faccb9
diff --git a/packages/yew-link/src/lib.rs b/packages/yew-link/src/lib.rs new file mode 100644 index 00000000000..2938d577826 --- /dev/null +++ b/packages/yew-link/src/lib.rs @@ -0,0 +1,684 @@ +use std::any::{Any, TypeId}; +use std::cell::RefCell; +use std::collections::HashMap; +#[cfg(target_arch = "wasm32")] +use std:...
[ "packages/yew-link/src/lib.rs" ]
[ { "comment": "see other comment about std::any::type_name. This is the client side code", "path": "packages/yew-link/src/lib.rs", "hunk": "@@ -0,0 +1,705 @@\n+use std::any::{Any, TypeId};\n+use std::cell::RefCell;\n+use std::collections::HashMap;\n+#[cfg(target_arch = \"wasm32\")]\n+use std::collections...
true
yewstack/yew
4,118
issue_to_patch
feat: all-you-can-inline html! overhaul
### Description Various macro improvements that help users write concise Yew code. **Automatic root-level fragments:** The `html!` macro now accepts multiple root nodes directly: ```rust html! { <h1>{"Title"}</h1> <p>{"Paragraph"}</p> } ``` **Streamlined `match` arms** Previously, `match`...
40e71342c3908bcbaea7ddd328a4b3cdcc7241ea
c092e3908c02e7bce08cc6a3884d250fe1888940
diff --git a/Cargo.lock b/Cargo.lock index 52e053ef460..26fef1c45bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4767,6 +4767,7 @@ dependencies = [ "rustversion", "syn 2.0.117", "trybuild", + "version_check", "yew", ] diff --git a/Cargo.toml b/Cargo.toml index d645f8348ff..ad7ec04e13c 100644 --- a/Cargo.toml...
[ "Cargo.lock", "Cargo.toml", "examples/boids/src/main.rs", "examples/counter_functional/src/main.rs", "examples/dyn_create_destroy_apps/src/counter.rs", "examples/dyn_create_destroy_apps/src/main.rs", "examples/function_delayed_input/src/main.rs", "examples/function_memory_game/src/components/chessboar...
[ { "comment": "hmm, not sure ..", "path": "examples/function_delayed_input/src/main.rs", "hunk": "@@ -68,13 +68,13 @@ fn App() -> Html {\n </form>\n </div>\n <div class=\"p-2 border border-black rounded\">\n- <p>{\n+ <p>\n ...
diff --git a/packages/yew-macro/tests/derive_props/pass.rs b/packages/yew-macro/tests/derive_props/pass.rs index c5495509c7a..4751ba4de72 100644 --- a/packages/yew-macro/tests/derive_props/pass.rs +++ b/packages/yew-macro/tests/derive_props/pass.rs @@ -265,10 +265,10 @@ mod value_into_some_value_in_props { #[::y...
true
yewstack/yew
4,118
comment_to_fix
feat: all-you-can-inline html! overhaul
hmm, not sure ..
40e71342c3908bcbaea7ddd328a4b3cdcc7241ea
c092e3908c02e7bce08cc6a3884d250fe1888940
diff --git a/examples/function_delayed_input/src/main.rs b/examples/function_delayed_input/src/main.rs index aaa3a639995..d73de799161 100644 --- a/examples/function_delayed_input/src/main.rs +++ b/examples/function_delayed_input/src/main.rs @@ -68,13 +68,13 @@ fn App() -> Html { </form> </di...
[ "examples/function_delayed_input/src/main.rs" ]
[ { "comment": "hmm, not sure ..", "path": "examples/function_delayed_input/src/main.rs", "hunk": "@@ -68,13 +68,13 @@ fn App() -> Html {\n </form>\n </div>\n <div class=\"p-2 border border-black rounded\">\n- <p>{\n+ <p>\n ...
true
yewstack/yew
4,125
issue_to_patch
Fix index title and icon
Follow up of #4112 The logo we have been using for 6 years is a tall rectangle. It has transparent column paddings to the left and right. Also the previous PR changed the index title to "Yew | The Rust Frontend Framework | Yew"
50050b324432122b7f7a40fcc20e4dafb6c25277
250d60806c57e894a40990d033d0e9ac7b7cb719
diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index 2cc22cbc2e1..736e4518426 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -1,4 +1,5 @@ import React from 'react' +import Head from '@docusaurus/Head' import Layout from '@theme/Layout' import styles from './inde...
[ "website/src/pages/index.tsx", "website/static/favicon.ico", "website/static/img/logo.png" ]
[]
true
yewstack/yew
4,112
issue_to_patch
Polish Docs
see individual commits. Note this is not about [język polski](https://en.wikipedia.org/wiki/Polish_language)
3650fc82a6da3d5951dd0581dd46bb4dc224f146
c56fbf3f873087f014ae786b6cd6a1126ff9b58f
diff --git a/README.md b/README.md index ccbf769804d..dc382e8ba3d 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,6 @@ Yew is named after a type of evergreen tree, and is pronounced /juː/. [Entry with audio on Cambridge Dictionary](https://dictionary.cambridge.org/dictionary/english/yew). -*Note: Yew is not 1....
[ "README.md", "website/docs/advanced-topics/server-side-rendering.mdx", "website/docs/concepts/function-components/properties.mdx", "website/docs/concepts/html/introduction.mdx", "website/docs/concepts/router.mdx", "website/docs/more/debugging.mdx", "website/docusaurus.config.js", "website/i18n/ja/docu...
[]
true
yewstack/yew
4,122
issue_to_patch
Feature soundness test should include the wasm32 target too Our current feature soundness step is on native target only: ``` cargo hack clippy -p yew -p yew-agent -p yew-router --feature-powerset --no-dev-deps --keep-going -- -D warnings ``` It doesn't catch warnings like [this one](https://github.com/yewstack/yew/p...
Check lints also on wasm32 target
#### Description Fixes #4121 It's not documented, but `cargo hack` supports a `--target` flag. Getting the default target is straight forward from `rustc --version`.
c994580fbf0fe2d6f4e8a7274de492b422555f4c
a13d1113ae31aa4c7033ea9e5bbf09205476b0e4
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 62ef8c6fa46..f25d21553c7 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -25,6 +25,9 @@ jobs: profile: - dev - release + target: + - host + - wasm32 ...
[ ".github/workflows/clippy.yml" ]
[]
true
yewstack/yew
4,099
issue_to_patch
Regression: elements are re-rendered even if they didn't change, when there's a list below them (worked in v0.19.3) **Problem** Elements are re-rendered even if they didn't change, when there's a list below them. It works correctly in yew `0.19.3`, but no longer in yew `0.20.0`. This is especially problematic wh...
fix: pair unkeyed children front-to-front during reconciliation
#### Description `BList::apply_unkeyed` stored children in reverse render order (`rev_children`) and paired old/new nodes from the **back**. When the child count changed between renders the pairing was wrong: growing a list by one at the tail caused the *first* child to be destroyed and recreated, while shrinking r...
dcdd698b30098df4abd2e6e7738704f7dcf1b28a
9aa56fc78cb16d08d9d8130d675a24d66a06ee42
diff --git a/packages/yew-macro/src/html_tree/lint/mod.rs b/packages/yew-macro/src/html_tree/lint/mod.rs index 18e1b83c0ed..108eb5aa5b7 100644 --- a/packages/yew-macro/src/html_tree/lint/mod.rs +++ b/packages/yew-macro/src/html_tree/lint/mod.rs @@ -70,26 +70,27 @@ impl Lint for AHrefLint { if l...
[ "packages/yew-macro/src/html_tree/lint/mod.rs", "packages/yew/src/dom_bundle/blist.rs", "tools/changelog/src/create_log_line.rs" ]
[ { "comment": "Does it even make sense to keep rights in reverse order if we do this?\n\nThe only reason I can recall why this is done so that no reordering or swapping of the elements in the vec needs to happen here. You need to check for yourself that the existing implementation is the only possible way to do ...
true
yewstack/yew
4,099
comment_to_fix
fix: pair unkeyed children front-to-front during reconciliation
Does it even make sense to keep rights in reverse order if we do this? The only reason I can recall why this is done so that no reordering or swapping of the elements in the vec needs to happen here. You need to check for yourself that the existing implementation is the only possible way to do this with `Vec<_>` and t...
dcdd698b30098df4abd2e6e7738704f7dcf1b28a
9aa56fc78cb16d08d9d8130d675a24d66a06ee42
diff --git a/packages/yew/src/dom_bundle/blist.rs b/packages/yew/src/dom_bundle/blist.rs index 878fbec4408..e5e99c28e27 100644 --- a/packages/yew/src/dom_bundle/blist.rs +++ b/packages/yew/src/dom_bundle/blist.rs @@ -1,6 +1,5 @@ //! This module contains fragments bundles, a [BList] use std::borrow::Borrow; -use std::...
[ "packages/yew/src/dom_bundle/blist.rs" ]
[ { "comment": "Does it even make sense to keep rights in reverse order if we do this?\n\nThe only reason I can recall why this is done so that no reordering or swapping of the elements in the vec needs to happen here. You need to check for yourself that the existing implementation is the only possible way to do ...
true
yewstack/yew
4,099
comment_to_fix
fix: pair unkeyed children front-to-front during reconciliation
I just noticed that this logic is no longer sound with the changed order in `apply_unkeyed`. When new items get added and removed at the back, this must check that keys in render order match (not back of render order). I guess there is no test case for this?
dcdd698b30098df4abd2e6e7738704f7dcf1b28a
9aa56fc78cb16d08d9d8130d675a24d66a06ee42
diff --git a/packages/yew/src/dom_bundle/blist.rs b/packages/yew/src/dom_bundle/blist.rs index 878fbec4408..e5e99c28e27 100644 --- a/packages/yew/src/dom_bundle/blist.rs +++ b/packages/yew/src/dom_bundle/blist.rs @@ -1,6 +1,5 @@ //! This module contains fragments bundles, a [BList] use std::borrow::Borrow; -use std::...
[ "packages/yew/src/dom_bundle/blist.rs" ]
[ { "comment": "I just noticed that this logic is no longer sound with the changed order in `apply_unkeyed`. When new items get added and removed at the back, this must check that keys in render order match (not back of render order).\nI guess there is no test case for this?", "path": "packages/yew/src/dom_bu...
true
yewstack/yew
4,120
issue_to_patch
fix: unused start_now warning
#### Description When Yew is used with target arch wasm32 (including the most usual use case in like `trunk build`). There is a warning users can't do anything about. ``` warning: function `start_now` is never used --> packages/yew/src/scheduler.rs:240:15 | 240 | pub(crate) fn start_now() { ...
54923c7dbe625751a677bd121b05c8975f32aa9b
97608372f3ce0521092849b2b7d15d5b8b3f4e2b
diff --git a/packages/yew/src/scheduler.rs b/packages/yew/src/scheduler.rs index 3c322a1ff68..2c94f1cbfdc 100644 --- a/packages/yew/src/scheduler.rs +++ b/packages/yew/src/scheduler.rs @@ -237,6 +237,13 @@ mod feat_hydration { pub(crate) use feat_hydration::*; /// Execute any pending [Runnable]s +#[cfg(any( + no...
[ "packages/yew/src/scheduler.rs" ]
[]
true
yewstack/yew
4,093
issue_to_patch
0.21 -> 0.22 regression: failed to insert node before next sibling NotFoundError **Problem** My yew app crashes on a state change after updating from 0.21 to 0.22-0.23. Here is a fully-minimized reproducible example. **Steps To Reproduce** ```toml [package] name = "yew_crash" version = "0.1.0" edition = "2021" [depe...
fix: update sibling_slot immediately on component reuse
Fixes #4092 #### Impacted usage patterns The bug requires three children in a sibling list, left to right: 1. A child that transitions from no DOM output to some 2. A component rendering zero DOM nodes 3. A child whose DOM node is removed in the current render ##### Opposing conditionals with an empty com...
83c78a47ad80856ea1459a25e7edb043c761ab60
3c9adc7473619a97a96f4f97695810ee6a6364c7
diff --git a/packages/yew/src/html/component/scope.rs b/packages/yew/src/html/component/scope.rs index 88ec635377b..5c74c2d4661 100644 --- a/packages/yew/src/html/component/scope.rs +++ b/packages/yew/src/html/component/scope.rs @@ -581,6 +581,19 @@ mod feat_csr { } pub(crate) fn reuse(&self, props:...
[ "packages/yew/src/html/component/scope.rs", "packages/yew/tests/use_state.rs" ]
[]
diff --git a/packages/yew/tests/use_state.rs b/packages/yew/tests/use_state.rs index d6713d75528..ad24c1ed6d1 100644 --- a/packages/yew/tests/use_state.rs +++ b/packages/yew/tests/use_state.rs @@ -413,3 +413,60 @@ async fn use_state_handle_as_prop_triggers_child_rerender_issue_4058() { CHILD_RENDER_COUNT.load(...
true
yewstack/yew
4,113
issue_to_patch
feat: add actix support for yew-link
#### Description Adds `actix_web` support for the `yew_link` crate introduced in #4027. #### Checklist <!-- For further details, please read CONTRIBUTING.md --> - [x] I have reviewed my own code - [x] I have added tests
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 62ef8c6fa46..7dd10a983df 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -44,7 +44,7 @@ jobs: if: matrix.profile == 'dev' run: >- cargo hack clippy - -p yew -p yew-agent -...
[ ".github/workflows/clippy.yml", ".github/workflows/main-checks.yml", ".github/workflows/test-website.yml", ".gitignore", "Cargo.lock", "Cargo.toml", "examples/README.md", "examples/actix_ssr_router/Cargo.toml", "examples/actix_ssr_router/README.md", "examples/actix_ssr_router/index.html", "examp...
[ { "comment": "I think this actually breaks docusaurus syntax hightlighting.", "path": "website/docs/advanced-topics/server-side-rendering.mdx", "hunk": "@@ -199,8 +199,8 @@ Multiple components requesting the same `(T, Input)` concurrently share a single\n \n #### Server setup\n \n-```rust ,ignore\n-use ...
diff --git a/examples/actix_ssr_router/tests/e2e.rs b/examples/actix_ssr_router/tests/e2e.rs new file mode 100644 index 00000000000..24383f585db --- /dev/null +++ b/examples/actix_ssr_router/tests/e2e.rs @@ -0,0 +1,31 @@ +#![cfg(all(target_arch = "wasm32", not(target_os = "wasi")))] + +use actix_ssr_router::{App, AppPr...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
I think this actually breaks docusaurus syntax hightlighting.
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/website/docs/advanced-topics/server-side-rendering.mdx b/website/docs/advanced-topics/server-side-rendering.mdx index ea544b0d34a..0189f1e2d4a 100644 --- a/website/docs/advanced-topics/server-side-rendering.mdx +++ b/website/docs/advanced-topics/server-side-rendering.mdx @@ -148,7 +148,10 @@ The `yew-link`...
[ "website/docs/advanced-topics/server-side-rendering.mdx" ]
[ { "comment": "I think this actually breaks docusaurus syntax hightlighting.", "path": "website/docs/advanced-topics/server-side-rendering.mdx", "hunk": "@@ -199,8 +199,8 @@ Multiple components requesting the same `(T, Input)` concurrently share a single\n \n #### Server setup\n \n-```rust ,ignore\n-use ...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
irrelevant to the PR but good addition.
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/.gitignore b/.gitignore index bec5f8c71aa..d3244a16012 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ dist/ *.iml /.idea/ /.vscode/ +.nvim.lua
[ ".gitignore" ]
[ { "comment": "irrelevant to the PR but good addition.", "path": ".gitignore", "hunk": "@@ -8,3 +8,4 @@ dist/\n *.iml\n /.idea/\n /.vscode/\n+.nvim.lua", "resolving_sha": "082854cedce320335d7001ba2ac3fe059229667a", "resolving_diff": "diff --git a/.gitignore b/.gitignore\nindex bec5f8c71aa..d3244a...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
The axum module is named pub mod axum, but the actix module is named pub mod service. This means: ```rs use axum: yew_link::axum::linked_state_handler use actix: yew_link::service::linked_state_handler ``` The actix module should be `pub mod actix` for consistency.
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/packages/yew-link/src/services.rs b/packages/yew-link/src/services.rs new file mode 100644 index 00000000000..a06f15706ee --- /dev/null +++ b/packages/yew-link/src/services.rs @@ -0,0 +1,134 @@ +#[cfg(feature = "axum")] +pub mod axum { + use std::sync::Arc; + + use axum::Json; + use axum::extract:...
[ "packages/yew-link/src/services.rs" ]
[ { "comment": "The axum module is named pub mod axum, but the actix module is named pub mod service. This means:\n```rs\nuse axum: yew_link::axum::linked_state_handler\nuse actix: yew_link::service::linked_state_handler\n```\n\nThe actix module should be `pub mod actix` for consistency.", "path": "packages/y...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
missing semicolon and [`data` is deprecated](https://docs.rs/actix-web/4.13.0/actix_web/struct.App.html#method.data) please use .app_data(resolver.clone()) also post() is unqualified. should be web::post()
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/packages/yew-link/src/services.rs b/packages/yew-link/src/services.rs new file mode 100644 index 00000000000..a06f15706ee --- /dev/null +++ b/packages/yew-link/src/services.rs @@ -0,0 +1,134 @@ +#[cfg(feature = "axum")] +pub mod axum { + use std::sync::Arc; + + use axum::Json; + use axum::extract:...
[ "packages/yew-link/src/services.rs" ]
[ { "comment": "missing semicolon\nand [`data` is deprecated](https://docs.rs/actix-web/4.13.0/actix_web/struct.App.html#method.data)\nplease use .app_data(resolver.clone())\n\nalso post() is unqualified. should be web::post()", "path": "packages/yew-link/src/services.rs", "hunk": "@@ -0,0 +1,87 @@\n+#[cf...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
actix-web should not be a workspace depencency if it's only used in yew-link also, `macros` is a default feature of actix-web 4. Specifying it is redundant. I think `rustls` is also unnecessary. The version pin "4.13.0" is unnecessarily exact. Other workspace deps use axum = "0.8", reqwest = "0.13". This should just ...
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/Cargo.toml b/Cargo.toml index 18c98b23072..05b3cf7a5c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,3 +66,5 @@ thiserror = "2.0" bincode = { version = "2.0.0-rc.3", features = ["serde"] } reqwest = "0.13" axum = "0.8" +# 4.13 requires rustc > 1.85 +actix-web = "<4.13"
[ "Cargo.toml" ]
[ { "comment": "actix-web should not be a workspace depencency if it's only used in yew-link\n\nalso, `macros` is a default feature of actix-web 4. Specifying it is redundant.\nI think `rustls` is also unnecessary.\n\nThe version pin \"4.13.0\" is unnecessarily exact. Other workspace deps use axum = \"0.8\", reqw...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
The file is already behind #[cfg(not(target_arch = "wasm32"))] in lib.rs. The inner module-level cfgs shouldn't repeat it. Same below.
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/packages/yew-link/src/services.rs b/packages/yew-link/src/services.rs new file mode 100644 index 00000000000..a06f15706ee --- /dev/null +++ b/packages/yew-link/src/services.rs @@ -0,0 +1,134 @@ +#[cfg(feature = "axum")] +pub mod axum { + use std::sync::Arc; + + use axum::Json; + use axum::extract:...
[ "packages/yew-link/src/services.rs" ]
[ { "comment": "The file is already behind #[cfg(not(target_arch = \"wasm32\"))] in lib.rs. The inner module-level cfgs shouldn't repeat it. Same below.", "path": "packages/yew-link/src/services.rs", "hunk": "@@ -0,0 +1,87 @@\n+#[cfg(all(feature = \"axum\", not(target_arch = \"wasm32\")))]", "resolvin...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
```suggestion There are multiple service providers, this example shows how to use `axum`, ```
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/website/docs/advanced-topics/server-side-rendering.mdx b/website/docs/advanced-topics/server-side-rendering.mdx index ea544b0d34a..0189f1e2d4a 100644 --- a/website/docs/advanced-topics/server-side-rendering.mdx +++ b/website/docs/advanced-topics/server-side-rendering.mdx @@ -148,7 +148,10 @@ The `yew-link`...
[ "website/docs/advanced-topics/server-side-rendering.mdx" ]
[ { "comment": "```suggestion\nThere are multiple service providers, this example shows how to use `axum`,\n```", "path": "website/docs/advanced-topics/server-side-rendering.mdx", "hunk": "@@ -212,9 +212,12 @@ let app = axum::Router::new()\n .with_state(resolver);\n ```\n \n+There is multiple service ...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
please fix
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/website/docs/advanced-topics/server-side-rendering.mdx b/website/docs/advanced-topics/server-side-rendering.mdx index ea544b0d34a..0189f1e2d4a 100644 --- a/website/docs/advanced-topics/server-side-rendering.mdx +++ b/website/docs/advanced-topics/server-side-rendering.mdx @@ -148,7 +148,10 @@ The `yew-link`...
[ "website/docs/advanced-topics/server-side-rendering.mdx" ]
[ { "comment": "please fix", "path": "website/docs/advanced-topics/server-side-rendering.mdx", "hunk": "@@ -212,9 +213,12 @@ let app = axum::Router::new()\n .with_state(resolver);\n ```\n \n+There are multiple service providers, this example shows how to use `axum`,\n+but you can use actix in a simila...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
pls fix
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/website/docs/advanced-topics/server-side-rendering.mdx b/website/docs/advanced-topics/server-side-rendering.mdx index ea544b0d34a..0189f1e2d4a 100644 --- a/website/docs/advanced-topics/server-side-rendering.mdx +++ b/website/docs/advanced-topics/server-side-rendering.mdx @@ -148,7 +148,10 @@ The `yew-link`...
[ "website/docs/advanced-topics/server-side-rendering.mdx" ]
[ { "comment": "pls fix", "path": "website/docs/advanced-topics/server-side-rendering.mdx", "hunk": "@@ -148,7 +148,7 @@ The `yew-link` crate provides a higher-level abstraction that unifies all three\n 3. **Wrap** your app in `<LinkProvider>`.\n 4. **Call** `use_linked_state::<MyData>(input)` in any comp...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
here too
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/website/docs/advanced-topics/server-side-rendering.mdx b/website/docs/advanced-topics/server-side-rendering.mdx index ea544b0d34a..0189f1e2d4a 100644 --- a/website/docs/advanced-topics/server-side-rendering.mdx +++ b/website/docs/advanced-topics/server-side-rendering.mdx @@ -148,7 +148,10 @@ The `yew-link`...
[ "website/docs/advanced-topics/server-side-rendering.mdx" ]
[ { "comment": "here too", "path": "website/docs/advanced-topics/server-side-rendering.mdx", "hunk": "@@ -171,7 +171,7 @@ The macro generates the `LinkedState` and (server-only) `LinkedStateResolve` tra\n \n If `resolve` can fail, declare `type Error`:\n \n-```rust ,ignore\n+```rust, ignore", "resolvi...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
earlier miscommunication can we have the old one back? otherwise it should be `use yew_link::axum::linked_state_handler;`
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/website/docs/advanced-topics/server-side-rendering.mdx b/website/docs/advanced-topics/server-side-rendering.mdx index ea544b0d34a..0189f1e2d4a 100644 --- a/website/docs/advanced-topics/server-side-rendering.mdx +++ b/website/docs/advanced-topics/server-side-rendering.mdx @@ -148,7 +148,10 @@ The `yew-link`...
[ "website/docs/advanced-topics/server-side-rendering.mdx" ]
[ { "comment": "earlier miscommunication\ncan we have the old one back?\n\notherwise it should be `use yew_link::axum::linked_state_handler;`", "path": "website/docs/advanced-topics/server-side-rendering.mdx", "hunk": "@@ -200,7 +200,8 @@ Multiple components requesting the same `(T, Input)` concurrently s...
true
yewstack/yew
4,113
comment_to_fix
feat: add actix support for yew-link
I think we should either expand this with some code snippets or refer to an actix-web example.
f94077619b61a2cf822f71f090a3916d24ba17f1
082854cedce320335d7001ba2ac3fe059229667a
diff --git a/website/docs/advanced-topics/server-side-rendering.mdx b/website/docs/advanced-topics/server-side-rendering.mdx index ea544b0d34a..0189f1e2d4a 100644 --- a/website/docs/advanced-topics/server-side-rendering.mdx +++ b/website/docs/advanced-topics/server-side-rendering.mdx @@ -148,7 +148,10 @@ The `yew-link`...
[ "website/docs/advanced-topics/server-side-rendering.mdx" ]
[ { "comment": "I think we should either expand this with some code snippets or refer to an actix-web example.", "path": "website/docs/advanced-topics/server-side-rendering.mdx", "hunk": "@@ -212,6 +213,9 @@ let app = axum::Router::new()\n .with_state(resolver);\n ```\n \n+There are multiple service p...
true
yewstack/yew
4,117
issue_to_patch
chore(deps): bump gloo from 0.11 to 0.12 and tokise from 0.2 to 0.3
#### Description Bump `gloo` from 0.11 to 0.12 and `tokise` from 0.2 to 0.3. Supersedes #4116 (Dependabot's gloo-only bump), which left `tokise` 0.2.1 pinned to `gloo = "0.11"`, pulling two copies of gloo into the tree. Bumping both together keeps a single gloo version in the dependency graph. gloo 0.12 sub-...
dcdd698b30098df4abd2e6e7738704f7dcf1b28a
4380bb2edb4b7c9227dae9443aaf5434cf5556e1
diff --git a/Cargo.lock b/Cargo.lock index 95bbfb0c75f..52e053ef460 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,7 +99,7 @@ version = "0.0.1" dependencies = [ "chrono", "futures 0.3.32", - "gloo-net 0.7.0", + "gloo-net", "yew", ] @@ -167,7 +167,7 @@ dependencies = [ "bytes", "form_urlencoded", "futur...
[ "Cargo.lock", "Cargo.toml", "packages/yew/Cargo.toml" ]
[]
true
yewstack/yew
4,114
issue_to_patch
refactor!: migrate workspace to Rust 1.85 and Edition 2024
#### Description Migrate the entire workspace to Rust 1.85 / Edition 2024. #### Checklist - [x] `fake` major version was ignored but now we can update it - [x] `rand` 0.10 - [x] I have reviewed my own code
5ac5ecc2b2f59202bba0d1ada2f6f4747bafc3dd
569e4df5f824b83b75c3e1946b84d1b993f58f22
diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index 18cf143a1f3..89f6a20a491 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -70,7 +70,7 @@ jobs: fail-fast: false matrix: toolchain: - - 1.84.0 + - 1.8...
[ ".github/workflows/main-checks.yml", "Cargo.lock", "Cargo.toml", "examples/async_clock/Cargo.toml", "examples/async_clock/src/main.rs", "examples/boids/Cargo.toml", "examples/boids/src/boid.rs", "examples/boids/src/main.rs", "examples/boids/src/math.rs", "examples/boids/src/simulation.rs", "exam...
[ { "comment": "todo: need a look", "path": "tools/website-test/build.rs", "hunk": "@@ -18,7 +18,7 @@ macro_rules! e {\n }\n \n macro_rules! assert {\n- ($condition:expr, $($fmt:tt),* $(,)?) => {\n+ ($condition:expr_2021, $($fmt:tt),* $(,)?) => {\n if !$condition { e!($($fmt),*) }\n };",...
diff --git a/packages/yew-macro/tests/classes_macro_test.rs b/packages/yew-macro/tests/classes_macro_test.rs index d7c36e236ff..f83c81d2409 100644 --- a/packages/yew-macro/tests/classes_macro_test.rs +++ b/packages/yew-macro/tests/classes_macro_test.rs @@ -1,5 +1,5 @@ #[allow(dead_code)] -#[rustversion::attr(stable(1....
true
yewstack/yew
4,105
issue_to_patch
Changelog format prevents GitHub from picking up contributors ## Others': <img width="1242" height="763" alt="Image" src="https://github.com/user-attachments/assets/d24718a1-51d1-45b6-a3e1-7779c9c7b061" /> ## Our's: <img width="941" height="899" alt="Image" src="https://github.com/user-attachments/assets/bc01ae47-e...
fix: convert changelog links to GitHub-native mentions in release notes
#### Description Fixes #4079 #### Checklist - [x] I have reviewed my own code - [x] I have added tests
13841df656dbcbf2348e36e0ebd2e547d96e8659
0a3796fc8c81966941ab0b3ec7ebf1e15fc62e39
diff --git a/Cargo.lock b/Cargo.lock index ea6e55f3c17..4a990ef53b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -520,6 +520,7 @@ name = "collect-release-info" version = "0.1.0" dependencies = [ "anyhow", + "regex", "serde_json", ] diff --git a/tools/collect-release-info/Cargo.toml b/tools/collect-release-info/...
[ "Cargo.lock", "tools/collect-release-info/Cargo.toml", "tools/collect-release-info/src/main.rs" ]
[]
true
yewstack/yew
3,509
issue_to_patch
Dynamic Prop Labels
#### Description Partially implements features from discussion #3477. This PR adds Dynamic Prop Labels, so that anyone can write their favorite attributes like [HTMX's `hx-on:click`](https://htmx.org/attributes/hx-on/): ```rust html! { <div "hx-on:click"="alert('Clicked!')">{ "Click" }</div> <div { "hx-o...
3b7aa83fbf099c00a140f93cdd99af8910157448
6240128cff7ab64a74b85d94def26426a4359243
diff --git a/packages/yew-macro/src/html_tree/html_element.rs b/packages/yew-macro/src/html_tree/html_element.rs index e6d65287012..bd8d5b561dd 100644 --- a/packages/yew-macro/src/html_tree/html_element.rs +++ b/packages/yew-macro/src/html_tree/html_element.rs @@ -4,10 +4,10 @@ use quote::{quote, quote_spanned, ToToken...
[ "packages/yew-macro/src/html_tree/html_element.rs", "packages/yew-macro/src/html_tree/html_list.rs", "packages/yew-macro/src/html_tree/lint/mod.rs", "packages/yew-macro/src/props/component.rs", "packages/yew-macro/src/props/element.rs", "packages/yew-macro/src/props/prop.rs", "packages/yew-macro/src/pro...
[ { "comment": "maybe that message could be improved because it wasn't obvious to me why this would fail. not blocking though", "path": "packages/yew-macro/tests/html_macro/dyn-prop-fail.stderr", "hunk": "@@ -0,0 +1,33 @@\n+error: expected a valid Rust identifier", "resolving_sha": "6240128cff7ab64a74...
diff --git a/packages/yew-macro/tests/html_macro/component-fail.stderr b/packages/yew-macro/tests/html_macro/component-fail.stderr index 08ea30e6772..0969a4c800a 100644 --- a/packages/yew-macro/tests/html_macro/component-fail.stderr +++ b/packages/yew-macro/tests/html_macro/component-fail.stderr @@ -259,7 +259,7 @@ err...
true
yewstack/yew
3,509
comment_to_fix
Dynamic Prop Labels
maybe that message could be improved because it wasn't obvious to me why this would fail. not blocking though
3b7aa83fbf099c00a140f93cdd99af8910157448
6240128cff7ab64a74b85d94def26426a4359243
diff --git a/packages/yew-macro/tests/html_macro/dyn-prop-fail.stderr b/packages/yew-macro/tests/html_macro/dyn-prop-fail.stderr new file mode 100644 index 00000000000..68a93c19db9 --- /dev/null +++ b/packages/yew-macro/tests/html_macro/dyn-prop-fail.stderr @@ -0,0 +1,69 @@ +error: components expect valid Rust identifi...
[ "packages/yew-macro/tests/html_macro/dyn-prop-fail.stderr" ]
[ { "comment": "maybe that message could be improved because it wasn't obvious to me why this would fail. not blocking though", "path": "packages/yew-macro/tests/html_macro/dyn-prop-fail.stderr", "hunk": "@@ -0,0 +1,33 @@\n+error: expected a valid Rust identifier", "resolving_sha": "6240128cff7ab64a74...
true
yewstack/yew
3,509
comment_to_fix
Dynamic Prop Labels
Maybe you can add a test to make sure this case also works? ``` let value: Option<AttrValue> = None; <span { dyn_prop() }={ value } /> let value: Option<AttrValue> = Some("alert('Clicked!')"); <span { dyn_prop() }={ value } /> ```
3b7aa83fbf099c00a140f93cdd99af8910157448
6240128cff7ab64a74b85d94def26426a4359243
diff --git a/packages/yew-macro/tests/html_macro/dyn-prop-pass.rs b/packages/yew-macro/tests/html_macro/dyn-prop-pass.rs new file mode 100644 index 00000000000..4ffc3a25669 --- /dev/null +++ b/packages/yew-macro/tests/html_macro/dyn-prop-pass.rs @@ -0,0 +1,55 @@ +#![no_implicit_prelude] + +// Shadow primitives +#[allow...
[ "packages/yew-macro/tests/html_macro/dyn-prop-pass.rs" ]
[ { "comment": "Maybe you can add a test to make sure this case also works?\r\n\r\n```\r\nlet value: Option<AttrValue> = None;\r\n<span { dyn_prop() }={ value } />\r\nlet value: Option<AttrValue> = Some(\"alert('Clicked!')\");\r\n<span { dyn_prop() }={ value } />\r\n```", "path": "packages/yew-macro/tests/htm...
true
yewstack/yew
3,509
comment_to_fix
Dynamic Prop Labels
What did you mean by this fixme?
3b7aa83fbf099c00a140f93cdd99af8910157448
6240128cff7ab64a74b85d94def26426a4359243
diff --git a/packages/yew-macro/src/props/prop.rs b/packages/yew-macro/src/props/prop.rs index f1c0ad48079..793ef8d73f1 100644 --- a/packages/yew-macro/src/props/prop.rs +++ b/packages/yew-macro/src/props/prop.rs @@ -2,11 +2,14 @@ use std::convert::TryFrom; use std::ops::{Deref, DerefMut}; use proc_macro2::{Spacing...
[ "packages/yew-macro/src/props/prop.rs" ]
[ { "comment": "What did you mean by this fixme?", "path": "packages/yew-macro/src/props/prop.rs", "hunk": "@@ -16,9 +19,85 @@ pub enum PropDirective {\n ApplyAsProperty(Token![~]),\n }\n \n+pub enum PropLabel {\n+ Static(HtmlDashedName),\n+ Dynamic(Expr),\n+}\n+\n+impl From<HtmlDashedName> for ...
true
yewstack/yew
3,509
comment_to_fix
Dynamic Prop Labels
Same here ```suggestion match self { Key::Static(dashed_name) => dashed_name.to_tokens(tokens), Key::Dynamic(expr) => expr.to_tokens(tokens), } ```
3b7aa83fbf099c00a140f93cdd99af8910157448
6240128cff7ab64a74b85d94def26426a4359243
diff --git a/packages/yew-macro/src/html_tree/html_element.rs b/packages/yew-macro/src/html_tree/html_element.rs index e6d65287012..bd8d5b561dd 100644 --- a/packages/yew-macro/src/html_tree/html_element.rs +++ b/packages/yew-macro/src/html_tree/html_element.rs @@ -4,10 +4,10 @@ use quote::{quote, quote_spanned, ToToken...
[ "packages/yew-macro/src/html_tree/html_element.rs" ]
[ { "comment": "Same here\r\n```suggestion\r\n match self {\r\n Key::Static(dashed_name) => dashed_name.to_tokens(tokens),\r\n Key::Dynamic(expr) => expr.to_tokens(tokens),\r\n }\r\n```", "path": "packages/yew-macro/src/html_t...
true
yewstack/yew
3,471
issue_to_patch
Link to migration guides at the top of changelog Link to migration guides at the top of changelog
Add migration link changelog
#### Description I added a link to the migration guides at the top of the changelog. Since the website did not have an index for the migration guides, I added it. And I also used that opportunity to fix the changelog tests which were broken due to username changes. Fixes #3213 #### Checklist - [X] I have...
686f08e1cfd85b54fefc7d9c1bbd793a1338638a
25a0eceb2d3ec38852de32eefab2d268dc1f1bc1
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fe2ba7cc71..b27efbcd046 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +[Link to all migration guides](https://yew.rs/docs/category/migration-guides) + ## ✨ yew **0.23.0** *(2026-03-10)* bumping from 0.22 should require no code changes for...
[ "CHANGELOG.md", "tools/changelog/src/write_changelog_file.rs", "tools/changelog/src/write_version_changelog.rs", "tools/changelog/tests/generate_yew_changelog_file.rs", "tools/changelog/tests/test_base.md", "tools/changelog/tests/test_expected.md", "website/i18n/ja/docusaurus-plugin-content-docs/current...
[]
diff --git a/tools/changelog/tests/generate_yew_changelog_file.rs b/tools/changelog/tests/generate_yew_changelog_file.rs index 56a80cb4f0b..b92e06a10e5 100644 --- a/tools/changelog/tests/generate_yew_changelog_file.rs +++ b/tools/changelog/tests/generate_yew_changelog_file.rs @@ -62,7 +62,7 @@ fn generate_yew_changelog...
true
yewstack/yew
4,107
issue_to_patch
Leverage Rust 1.78-1.84 APIs
#### Description this is a follow up to #3900, which bumped the MSRV but didn't fully utilize the new rust APIs. #### Checklist - [x] I have reviewed my own code
ac7381719ee0fb2b81a36499ea5e82b681232149
8b3b25e85c3b2f56b7ca6a3658078c52acd7f11e
diff --git a/packages/yew-agent/src/oneshot/provider.rs b/packages/yew-agent/src/oneshot/provider.rs index 663ece4e61b..0561182a18b 100644 --- a/packages/yew-agent/src/oneshot/provider.rs +++ b/packages/yew-agent/src/oneshot/provider.rs @@ -1,6 +1,7 @@ use core::fmt; use std::any::type_name; use std::cell::RefCell; ...
[ "packages/yew-agent/src/oneshot/provider.rs", "packages/yew-agent/src/reactor/hooks.rs", "packages/yew-agent/src/reactor/provider.rs", "packages/yew-agent/src/scope_ext.rs", "packages/yew-agent/src/worker/hooks.rs", "packages/yew-agent/src/worker/provider.rs", "packages/yew-macro/src/derive_props/field....
[]
true
yewstack/yew
3,422
issue_to_patch
Add useful methods to `UseStateHandle` & `UseReducerHandle`
#### Description This PR adds: - `UseStateHandle::get` & `UseReducerHandle::get` that return the contained value of the handle in the form in which it's stored internally: in an Rc; These 2 methods will make it easier to work with non(-trivially)-clonable types in said containers; - `UseStateHandle::into_inner` & ...
408d70c2c4b0bf83a75cedf9be93968436a9e2ac
987291a1a17e7f7ab39ce33ed7ada8bbd62f1ced
diff --git a/examples/timer_functional/src/main.rs b/examples/timer_functional/src/main.rs index 4f2ffc067ae..61dfd46854a 100644 --- a/examples/timer_functional/src/main.rs +++ b/examples/timer_functional/src/main.rs @@ -162,11 +162,13 @@ fn App() -> Html { }) }; - let on_cancel = { - Callback...
[ "examples/timer_functional/src/main.rs", "packages/yew/src/functional/hooks/use_reducer.rs", "packages/yew/src/functional/hooks/use_state.rs", "packages/yew/tests/use_state.rs", "website/docs/concepts/function-components/state.mdx", "website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/function...
[ { "comment": "Can we avoid the transmute somehow?", "path": "packages/yew/src/functional/hooks/use_state.rs", "hunk": "@@ -111,6 +113,12 @@ impl<T: fmt::Debug> fmt::Debug for UseStateHandle<T> {\n }\n \n impl<T> UseStateHandle<T> {\n+ /// Returns the inner value of the handle.\n+ pub fn get(&self)...
diff --git a/packages/yew/tests/use_state.rs b/packages/yew/tests/use_state.rs index d6713d75528..2ac53faca37 100644 --- a/packages/yew/tests/use_state.rs +++ b/packages/yew/tests/use_state.rs @@ -2,6 +2,8 @@ mod common; +use std::rc::Rc; + use common::obtain_result; use wasm_bindgen_test::*; use yew::prelude::...
true
yewstack/yew
3,427
issue_to_patch
Update v21 website doc
#### Description Correct add yew dependency to Cargo.toml
408d70c2c4b0bf83a75cedf9be93968436a9e2ac
0378bb1950f9d7aa3911af886fcad0dcefbfa99d
diff --git a/website/docs/getting-started/build-a-sample-app.mdx b/website/docs/getting-started/build-a-sample-app.mdx index bffa2dff60b..6fd85fe640c 100644 --- a/website/docs/getting-started/build-a-sample-app.mdx +++ b/website/docs/getting-started/build-a-sample-app.mdx @@ -60,16 +60,15 @@ To convert this simple comm...
[ "website/docs/getting-started/build-a-sample-app.mdx", "website/docs/tutorial/index.mdx", "website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx", "website/versioned_docs/version-0.20/tutorial/index.mdx", "website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx", "w...
[ { "comment": "```suggestion\r\nAdd `yew` to the list of dependencies:\r\n```", "path": "website/versioned_docs/version-0.21/tutorial/index.mdx", "hunk": "@@ -62,18 +62,20 @@ cargo run\n ## Our first static page\n \n To convert this simple command line application to a basic Yew web application, a few ch...
true
yewstack/yew
3,427
comment_to_fix
Update v21 website doc
```suggestion Add `yew` to the list of dependencies: ```
408d70c2c4b0bf83a75cedf9be93968436a9e2ac
0378bb1950f9d7aa3911af886fcad0dcefbfa99d
diff --git a/website/versioned_docs/version-0.21/tutorial/index.mdx b/website/versioned_docs/version-0.21/tutorial/index.mdx index 861939fb3ba..70e41016afd 100644 --- a/website/versioned_docs/version-0.21/tutorial/index.mdx +++ b/website/versioned_docs/version-0.21/tutorial/index.mdx @@ -62,9 +62,9 @@ cargo run ## Our...
[ "website/versioned_docs/version-0.21/tutorial/index.mdx" ]
[ { "comment": "```suggestion\r\nAdd `yew` to the list of dependencies:\r\n```", "path": "website/versioned_docs/version-0.21/tutorial/index.mdx", "hunk": "@@ -62,18 +62,20 @@ cargo run\n ## Our first static page\n \n To convert this simple command line application to a basic Yew web application, a few ch...
true
yewstack/yew
3,427
comment_to_fix
Update v21 website doc
Body tags are not needed for trunk applications.
408d70c2c4b0bf83a75cedf9be93968436a9e2ac
0378bb1950f9d7aa3911af886fcad0dcefbfa99d
diff --git a/website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx b/website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx index 2157debc0af..a43768c1990 100644 --- a/website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx +++ b/website/versioned_docs/version...
[ "website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx" ]
[ { "comment": "Body tags are not needed for trunk applications.", "path": "website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx", "hunk": "@@ -127,6 +127,7 @@ Finally, add an `index.html` file in the root directory of your app.\n <head>\n <meta charset=\"utf-8\" />\n ...
true
yewstack/yew
3,427
comment_to_fix
Update v21 website doc
```suggestion Add `yew` to the list of dependencies: ``` I think the original sentence is correct. The one in pull request is a run-on sentence.
408d70c2c4b0bf83a75cedf9be93968436a9e2ac
0378bb1950f9d7aa3911af886fcad0dcefbfa99d
diff --git a/website/docs/getting-started/build-a-sample-app.mdx b/website/docs/getting-started/build-a-sample-app.mdx index bffa2dff60b..6fd85fe640c 100644 --- a/website/docs/getting-started/build-a-sample-app.mdx +++ b/website/docs/getting-started/build-a-sample-app.mdx @@ -60,16 +60,15 @@ To convert this simple comm...
[ "website/docs/getting-started/build-a-sample-app.mdx" ]
[ { "comment": "```suggestion\r\nAdd `yew` to the list of dependencies:\r\n```\r\n\r\nI think the original sentence is correct. The one in pull request is a run-on sentence.", "path": "website/docs/getting-started/build-a-sample-app.mdx", "hunk": "@@ -46,16 +46,15 @@ To convert this simple command line ap...
true
yewstack/yew
3,427
comment_to_fix
Update v21 website doc
Body tags are not needed for trunk applications.
408d70c2c4b0bf83a75cedf9be93968436a9e2ac
0378bb1950f9d7aa3911af886fcad0dcefbfa99d
diff --git a/website/docs/getting-started/build-a-sample-app.mdx b/website/docs/getting-started/build-a-sample-app.mdx index bffa2dff60b..6fd85fe640c 100644 --- a/website/docs/getting-started/build-a-sample-app.mdx +++ b/website/docs/getting-started/build-a-sample-app.mdx @@ -60,16 +60,15 @@ To convert this simple comm...
[ "website/docs/getting-started/build-a-sample-app.mdx" ]
[ { "comment": "Body tags are not needed for trunk applications.", "path": "website/docs/getting-started/build-a-sample-app.mdx", "hunk": "@@ -120,6 +119,7 @@ Finally, add an `index.html` file in the root directory of your app.\n <head>\n <meta charset=\"utf-8\" />\n <title>Yew App</ti...
true
yewstack/yew
3,427
comment_to_fix
Update v21 website doc
```suggestion Add `yew` to the list of dependencies: ```
408d70c2c4b0bf83a75cedf9be93968436a9e2ac
0378bb1950f9d7aa3911af886fcad0dcefbfa99d
diff --git a/website/docs/tutorial/index.mdx b/website/docs/tutorial/index.mdx index 18ce8677fd6..03483af2d97 100644 --- a/website/docs/tutorial/index.mdx +++ b/website/docs/tutorial/index.mdx @@ -62,9 +62,9 @@ cargo run ## Our first static page To convert this simple command line application to a basic Yew web app...
[ "website/docs/tutorial/index.mdx" ]
[ { "comment": "```suggestion\r\nAdd `yew` to the list of dependencies:\r\n```", "path": "website/docs/tutorial/index.mdx", "hunk": "@@ -62,9 +62,9 @@ cargo run\n ## Our first static page\n \n To convert this simple command line application to a basic Yew web application, a few changes are needed.\n-Updat...
true
yewstack/yew
3,427
comment_to_fix
Update v21 website doc
```suggestion Add `yew` to the list of dependencies: ```
408d70c2c4b0bf83a75cedf9be93968436a9e2ac
0378bb1950f9d7aa3911af886fcad0dcefbfa99d
diff --git a/website/versioned_docs/version-0.20/tutorial/index.mdx b/website/versioned_docs/version-0.20/tutorial/index.mdx index de7bf427625..16d54af0b1d 100644 --- a/website/versioned_docs/version-0.20/tutorial/index.mdx +++ b/website/versioned_docs/version-0.20/tutorial/index.mdx @@ -62,9 +62,9 @@ cargo run ## Our...
[ "website/versioned_docs/version-0.20/tutorial/index.mdx" ]
[ { "comment": "```suggestion\r\nAdd `yew` to the list of dependencies:\r\n```", "path": "website/versioned_docs/version-0.20/tutorial/index.mdx", "hunk": "@@ -62,18 +62,20 @@ cargo run\n ## Our first static page\n \n To convert this simple command line application to a basic Yew web application, a few ch...
true
yewstack/yew
3,427
comment_to_fix
Update v21 website doc
```suggestion Add `yew` to the list of dependencies: ```
408d70c2c4b0bf83a75cedf9be93968436a9e2ac
0378bb1950f9d7aa3911af886fcad0dcefbfa99d
diff --git a/website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx b/website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx index a840ab9d92a..a47365427dc 100644 --- a/website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx +++ b/website/versioned_docs/version...
[ "website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx" ]
[ { "comment": "```suggestion\r\nAdd `yew` to the list of dependencies:\r\n```", "path": "website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx", "hunk": "@@ -46,19 +46,20 @@ To convert this simple command line application to a basic Yew web application,\n \n #### Update Cargo.toml\n ...
true
yewstack/yew
4,095
issue_to_patch
Struggling with ways to convert someting into `Html`. **Problem** <!-- A clear and concise description of what the bug is. --> **Steps To Reproduce** Steps to reproduce the behavior: ```rust #[test] fn test_to_html_to_children_comp_compiles() { use crate::prelude::*; struct Foo; ...
feat: add IntoPropValue<ChildrenRenderer<VNode>> for string-like types
Resolves #3443 #### Description - Extend the `impl_into_prop_value_via_attr_value!` macro to also generate `IntoPropValue<ChildrenRenderer<VNode>>`, so string-like types (`String`, `&AttrValue`, `Rc<str>`, `Cow<'static, str>`) can be passed directly as children to components using `children: Children` props - Re...
19588e9ad0b72019045f18d21a22cd87efcba749
774df8c120b905aa22995f8542a81faf4e1e38c6
diff --git a/packages/yew/src/html/conversion/into_prop_value.rs b/packages/yew/src/html/conversion/into_prop_value.rs index e49498c5314..2a512612f49 100644 --- a/packages/yew/src/html/conversion/into_prop_value.rs +++ b/packages/yew/src/html/conversion/into_prop_value.rs @@ -201,12 +201,6 @@ impl<C: BaseComponent> Int...
[ "packages/yew-macro/tests/html_macro/children-api-pass.rs", "packages/yew-macro/tests/html_macro/custom-type-in-block-fail.rs", "packages/yew-macro/tests/html_macro/custom-type-in-block-fail.stderr", "packages/yew-macro/tests/html_macro/string-children-pass.rs", "packages/yew/src/html/conversion/into_prop_v...
[]
diff --git a/packages/yew-macro/tests/html_macro/children-api-pass.rs b/packages/yew-macro/tests/html_macro/children-api-pass.rs new file mode 100644 index 00000000000..59b901541ce --- /dev/null +++ b/packages/yew-macro/tests/html_macro/children-api-pass.rs @@ -0,0 +1,77 @@ +#[derive(::std::clone::Clone, ::std::cmp::Pa...
true
yewstack/yew
3,470
issue_to_patch
Link to migration guides at the top of changelog Link to migration guides at the top of changelog
Added a migration link to changelogs
#### Description Closes #3213 This adds a migration link in the changelogs #### Checklist <!-- For further details, please read CONTRIBUTING.md --> - [x] I have reviewed my own code - [x] I have added tests
8af333bbdc693e70b819092777057015ffe2ea31
7711c89bf7b382561180c15a76d90cd954cf0d02
diff --git a/CHANGELOG.md b/CHANGELOG.md index f6a45a599e6..1fe2ba7cc71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -151,6 +151,7 @@ Yew pinned to 0.23 now. ## ✨ yew **0.21.0** *(2023-09-23)* +Users can follow the [migration guide](https://yew.rs/docs/migration-guides/yew/from-0_20_0-to-0_21_0) to migrate from...
[ "CHANGELOG.md" ]
[]
true
yewstack/yew
4,106
issue_to_patch
refactor: un-vendor gloo-worker from yew-agent
#### Description Un-vendor gloo-worker from yew-agent, switching back to the upstream `gloo-worker = "0.6"` crate dependency. We originally vendored gloo-worker in #3859 (thanks to @LucaCappelletti94 ) because the upstream crate (v0.5) lacked module worker type support (`WorkerType::Module`). gloo-worker 0.6.0 no...
13841df656dbcbf2348e36e0ebd2e547d96e8659
17377707664e4098c80f69f6f063209e57c2a69a
diff --git a/Cargo.lock b/Cargo.lock index ea6e55f3c17..362465ea5a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1229,7 +1229,7 @@ dependencies = [ "gloo-storage", "gloo-timers 0.3.0", "gloo-utils 0.2.0", - "gloo-worker", + "gloo-worker 0.5.0", ] [[package]] @@ -1421,7 +1421,7 @@ dependencies = [ "bincode 1...
[ "Cargo.lock", "packages/yew-agent/Cargo.toml", "packages/yew-agent/src/codec.rs", "packages/yew-agent/src/lib.rs", "packages/yew-agent/src/oneshot/bridge.rs", "packages/yew-agent/src/oneshot/mod.rs", "packages/yew-agent/src/oneshot/provider.rs", "packages/yew-agent/src/oneshot/registrar.rs", "packag...
[]
true
yewstack/yew
4,110
issue_to_patch
`yew-router` silently strips trailing slashes, causing surprising relative-path behavior **Problem** `yew-router` strips trailing slashes from both route patterns and incoming pathnames before matching. This means `/settings` and `/settings/` always resolve to the same route variant and render the same component. Ho...
fix: stop stripping trailing slashes in yew-router
#### Description Stop stripping trailing slashes from route patterns and incoming URLs during matching. `/path` and `/path/` are now distinct routes, matching standard URL semantics. Previously, `yew-router` called `strip_slash_suffix` on both registered route patterns and incoming pathnames before matching. This...
1371bd34286fc728dd2ba1e07e2ba813d5698dcc
f03475f73533dd33e7870651f0ddb67dc1805a86
diff --git a/packages/yew-router/src/macro_helpers.rs b/packages/yew-router/src/macro_helpers.rs index 9c24be29270..78b0194992f 100644 --- a/packages/yew-router/src/macro_helpers.rs +++ b/packages/yew-router/src/macro_helpers.rs @@ -9,7 +9,6 @@ pub fn encode_path_for_url(path: &str) -> String { use std::collections:...
[ "packages/yew-router/src/macro_helpers.rs", "packages/yew-router/tests/router_unit_tests.rs", "website/docs/concepts/router.mdx", "website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/router.mdx", "website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/router.mdx", "website/i18n/z...
[]
diff --git a/packages/yew-router/tests/router_unit_tests.rs b/packages/yew-router/tests/router_unit_tests.rs index 21d1124c4fd..d80561cf82d 100644 --- a/packages/yew-router/tests/router_unit_tests.rs +++ b/packages/yew-router/tests/router_unit_tests.rs @@ -50,6 +50,12 @@ fn router_trailing_slash() { }), ...
true
yewstack/yew
4,096
issue_to_patch
Switch from route-recognizer to matchit
The motivation is well-explained in #4057 Also added a unit test for nested router behavior as documented on yew.rs This is a breaking change and we will need a migration guide at yew-router release. Apart from the obvious syntax change, note that **ambiguous route parameters now panic instead of silently shad...
19588e9ad0b72019045f18d21a22cd87efcba749
5927cc538d78fb4ac13b0e12aadf3ddc29258a5b
diff --git a/Cargo.lock b/Cargo.lock index ea6e55f3c17..29fd4c92827 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -197,7 +197,7 @@ dependencies = [ "hyper", "hyper-util", "itoa", - "matchit", + "matchit 0.8.4", "memchr", "mime", "percent-encoding", @@ -2166,6 +2166,12 @@ version = "0.8.4" source = "registry+...
[ "Cargo.lock", "examples/function_router/src/app.rs", "examples/router/src/main.rs", "examples/wasi_ssr_module/src/router.rs", "packages/yew-router-macro/src/routable_derive.rs", "packages/yew-router-macro/tests/routable_derive/old-param-syntax-fail.rs", "packages/yew-router-macro/tests/routable_derive/o...
[]
diff --git a/packages/yew-router-macro/tests/routable_derive/old-param-syntax-fail.rs b/packages/yew-router-macro/tests/routable_derive/old-param-syntax-fail.rs new file mode 100644 index 00000000000..df8babd760b --- /dev/null +++ b/packages/yew-router-macro/tests/routable_derive/old-param-syntax-fail.rs @@ -0,0 +1,11 ...
true
yewstack/yew
4,100
issue_to_patch
fix: bump minimum web-sys to 0.3.70
Reported on discord. This is a sneaky error introduced since https://github.com/yewstack/yew/commit/aa211192a9a6d5edccc3db13d36756d2cbc2a0bf (two years ago). It can cause a compile error when somebody picks up a 2 year old project again.
170c7a602d3021df635193b9e170b7cb0423fbf6
c89a9b2d9a609b73c30b9a6ce3d0a7be9b8af460
diff --git a/Cargo.toml b/Cargo.toml index 63a97a92aa9..20f302f1a54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" wasm-bindgen-test = "0.3" js-sys = "0.3" -web-sys = "0.3" +web-sys = "0.3.70" gloo = "0.11" serde = "1" serde_json = "1"
[ "Cargo.toml" ]
[]
true
yewstack/yew
4,101
issue_to_patch
chore: bump wasm-opt to version_129 in all example crates
[release 17 hours ago](https://github.com/WebAssembly/binaryen/releases/tag/version_129)
19588e9ad0b72019045f18d21a22cd87efcba749
ac911e6e5b71ce1b91c54284e3c7fdc7730b4544
diff --git a/examples/async_clock/Trunk.toml b/examples/async_clock/Trunk.toml index fe135582930..f6ad36c4520 100644 --- a/examples/async_clock/Trunk.toml +++ b/examples/async_clock/Trunk.toml @@ -1,2 +1,2 @@ [tools] -wasm_opt = "version_128" +wasm_opt = "version_129" diff --git a/examples/boids/Trunk.toml b/examples/...
[ "examples/async_clock/Trunk.toml", "examples/boids/Trunk.toml", "examples/communication_child_to_parent/Trunk.toml", "examples/communication_grandchild_with_grandparent/Trunk.toml", "examples/communication_grandparent_to_grandchild/Trunk.toml", "examples/communication_parent_to_child/Trunk.toml", "examp...
[]
true
yewstack/yew
4,094
issue_to_patch
The "unreleased version header" text overflows on smaller phones https://api.yew.rs/next/yew/ <img width="408" height="694" alt="Image" src="https://github.com/user-attachments/assets/29848a1f-06b9-4667-ba9b-b678ae1cc29e" />
Prevent unreleased version header overflow on mobile
#### Description Fixes #4041 #### Checklist - [x] I have tested and it fixes the header across screen dimensions
83c78a47ad80856ea1459a25e7edb043c761ab60
df8fe4a1615b3fb78eb05fe37e46eb10523d1dde
diff --git a/api-docs/styles.css b/api-docs/styles.css index 6df5e9397ea..096c2317a71 100644 --- a/api-docs/styles.css +++ b/api-docs/styles.css @@ -5,9 +5,7 @@ left: 0; top: 0; right: 0; - height: 70px; - padding-top: 10px; - padding-bottom: 10px; + padding: 10px 15px; text-align: cente...
[ "api-docs/styles.css" ]
[]
true
yewstack/yew
4,033
issue_to_patch
Yew blocks the main thread often while processing tasks **Problem** Yew's scheduler, while processing tasks, doesn't yield to the main thread for a long time. It can cause various problems, such as web page being unresponsive. Further reading: https://web.dev/articles/optimize-long-tasks?utm_source=devtools **Steps...
fix: yield when 16ms has passed and no dom mutating tasks are pending
Fixes #4032. This makes the scheduler in the browser environment yield every ~16 ms #### Concerns ~~- DOM may be partially updated when the browser paints during a yield. This is arguably better than the status quo, where the browser cannot paint at all until the entire batch completes, causing the page to app...
8a222d701d8a97d6bc7243d9ba994deb63fb42e0
46ce0d8b268b31110e1393f33108df7d44250c3b
diff --git a/packages/yew/src/scheduler.rs b/packages/yew/src/scheduler.rs index 4a42f33df65..0a710b95419 100644 --- a/packages/yew/src/scheduler.rs +++ b/packages/yew/src/scheduler.rs @@ -249,7 +249,10 @@ pub(crate) fn start_now() { mod arch { use std::sync::atomic::{AtomicBool, Ordering}; + use wasm_bindge...
[ "packages/yew/src/scheduler.rs" ]
[ { "comment": "an alternative is the Performance API which has μs resolution (as opposed to ms) and monotonicity, neither of which we really need.", "path": "packages/yew/src/scheduler.rs", "hunk": "@@ -232,16 +235,46 @@ mod arch {\n IS_SCHEDULED.store(is, Ordering::Relaxed)\n }\n \n+ cons...
true
yewstack/yew
4,033
comment_to_fix
fix: yield when 16ms has passed and no dom mutating tasks are pending
This should be available in `web_sys` as [`set_timeout_with_callback_and_timeout_and_arguments_0`](https://docs.rs/web-sys/latest/web_sys/struct.Window.html#method.set_timeout_with_callback_and_timeout_and_arguments_0) (a bit verbose I suppose). Other than that lgtm.
8a222d701d8a97d6bc7243d9ba994deb63fb42e0
46ce0d8b268b31110e1393f33108df7d44250c3b
diff --git a/packages/yew/src/scheduler.rs b/packages/yew/src/scheduler.rs index 4a42f33df65..0a710b95419 100644 --- a/packages/yew/src/scheduler.rs +++ b/packages/yew/src/scheduler.rs @@ -249,7 +249,10 @@ pub(crate) fn start_now() { mod arch { use std::sync::atomic::{AtomicBool, Ordering}; + use wasm_bindge...
[ "packages/yew/src/scheduler.rs" ]
[ { "comment": "This should be available in `web_sys` as [`set_timeout_with_callback_and_timeout_and_arguments_0`](https://docs.rs/web-sys/latest/web_sys/struct.Window.html#method.set_timeout_with_callback_and_timeout_and_arguments_0) (a bit verbose I suppose). Other than that lgtm.", "path": "packages/yew/sr...
true
yhirose/cpp-httplib
2,473
issue_to_patch
OSS-Fuzz: Add new fuzzer targets multipart parsing
This PR creates a new OSS-Fuzz fuzzer targets multipart parsing.
fe332fa06bac76a1c6d402c08f414052999347da
2b3d30cd07109186003115f575849d0da0cfbd77
[ "test/fuzzing/Makefile", "test/fuzzing/multipart_parser_fuzzer.cc" ]
[]
diff --git a/test/fuzzing/Makefile b/test/fuzzing/Makefile index da5d696825..e0874d95df 100644 --- a/test/fuzzing/Makefile +++ b/test/fuzzing/Makefile @@ -13,7 +13,7 @@ ZLIB_SUPPORT = -DCPPHTTPLIB_ZLIB_SUPPORT -lz BROTLI_DIR = /usr/local/opt/brotli # BROTLI_SUPPORT = -DCPPHTTPLIB_BROTLI_SUPPORT -I$(BROTLI_DIR)/includ...
true
yhirose/cpp-httplib
2,472
issue_to_patch
use strict hex parsing in decode_query_component
decode_query_component decodes each percent escape by handing a two character substring to std::strtoul, which tolerates a leading sign or whitespace, so input that is not valid hex still parses. reached from untrusted query strings through parse_query_text, "%-0" decodes to a NUL byte, "%-1" to 0xFF and "%+5" or "% 5"...
fe332fa06bac76a1c6d402c08f414052999347da
902fb52616b59e066622ea61cdf99bcd07e57c4c
diff --git a/httplib.h b/httplib.h index c265ddd43f..53b15ed81d 100644 --- a/httplib.h +++ b/httplib.h @@ -9734,11 +9734,9 @@ inline std::string decode_query_component(const std::string &component, for (size_t i = 0; i < component.size(); i++) { if (component[i] == '%' && i + 2 < component.size()) { - st...
[ "httplib.h", "test/test.cc" ]
[]
diff --git a/test/test.cc b/test/test.cc index 0392778cb1..d682e86ae7 100644 --- a/test/test.cc +++ b/test/test.cc @@ -386,6 +386,19 @@ TEST(DecodePathTest, UnicodeEncoding) { EXPECT_EQ("", decode_path_component("%uD800")); } +TEST(DecodeQueryTest, RejectsNonHexEscapes) { + // A sign or whitespace inside the two...
true
yhirose/cpp-httplib
2,469
issue_to_patch
cast to unsigned char before ctype calls in is_hex and is_token_char
**Negative char reaches ctype in parsing helpers** `is_hex`, `is_token_char` and `is_multipart_boundary_chars_valid` hand a raw `char` to `isdigit`/`isalnum`, so a byte above 0x7F sign-extends to a negative `int` and the ctype call becomes undefined (the MSVC debug CRT asserts on it). These helpers run on untrusted in...
79d83feb1829dc6e44d636019e2883662c1b89ff
9bfb2b5db9faeb7a8765b307cba2abad70a01358
diff --git a/httplib.h b/httplib.h index 4fc027d4fb..9a9ca8e29b 100644 --- a/httplib.h +++ b/httplib.h @@ -4386,7 +4386,7 @@ inline bool set_socket_opt_time(socket_t sock, int level, int optname, } inline bool is_hex(char c, int &v) { - if (isdigit(c)) { + if (isdigit(static_cast<unsigned char>(c))) { v = c ...
[ "httplib.h" ]
[]
true
yhirose/cpp-httplib
2,463
issue_to_patch
add set_hostname_addr_map to WebSocketClient
WebSockets also need the set_hostname_addr_map function when connecting.
44215e23e92c473a3553d24ae634aed6eefc7dd0
e0c548b0380c28d550f962563c9820a080150bad
diff --git a/httplib.h b/httplib.h index 8eb86a36e0..80da0f275f 100644 --- a/httplib.h +++ b/httplib.h @@ -3842,6 +3842,7 @@ class WebSocketClient { void set_socket_options(SocketOptions socket_options); void set_connection_timeout(time_t sec, time_t usec = 0); void set_interface(const std::string &intf); + v...
[ "httplib.h", "test/test.cc" ]
[ { "comment": "Implementation looks good — faithfully mirrors `ClientImpl::set_hostname_addr_map` 👍\n\nOne issue in this test: `0.0.0.0` will likely fail on the Linux CI. There, `connect(2)` to `0.0.0.0` is treated as `127.0.0.1`, so it reaches the server bound above → `connect()` succeeds and\n`EXPECT_FALSE` f...
diff --git a/test/test.cc b/test/test.cc index 03ac254688..0092b20065 100644 --- a/test/test.cc +++ b/test/test.cc @@ -17644,6 +17644,57 @@ TEST(WebSocketTest, ComplexPath) { EXPECT_TRUE(ws2.is_valid()); } +TEST(WebSocketTest, SpecifyServerIPAddress_AnotherHostname) { + Server svr; + svr.WebSocket("/ws", [](con...
true
yhirose/cpp-httplib
2,465
issue_to_patch
Ignore range requests for unknown-length streaming responses
Clients like ffmpeg/browser-like clients may send `Range: bytes=0-` for live multipart streams. A concrete example is a live MJPEG stream served as multipart/x-mixed-replace. In such a scenario the resource is not meaningfully byte-range addressable: there is no known total length and no stable "complete representat...
44215e23e92c473a3553d24ae634aed6eefc7dd0
d6fbf942a568abf3c8ce9df9245ea2f51f484c23
diff --git a/httplib.h b/httplib.h index 439b3facef..557d532909 100644 --- a/httplib.h +++ b/httplib.h @@ -8362,6 +8362,14 @@ inline void coalesce_ranges(Ranges &ranges, size_t content_length) { inline bool range_error(Request &req, Response &res) { if (!req.ranges.empty() && 200 <= res.status && res.status < 300...
[ "httplib.h", "test/test.cc" ]
[]
diff --git a/test/test.cc b/test/test.cc index eb73eb10a2..8c52caa936 100644 --- a/test/test.cc +++ b/test/test.cc @@ -3589,6 +3589,23 @@ class ServerTest : public ::testing::Test { return true; }); }) + .Get("/streamed-without-length", + [&](co...
true
yhirose/cpp-httplib
2,448
issue_to_patch
Feature 2446 no proxy env
The primary goal of this pull request is to provide a reference implementation with Opus 4.7 (#2446), focusing not only on functionality but also on security by ensuring there are no vulnerabilities.
b1792ef29ca66f8dcb44b1678e597676a33a3f1b
2ad877322b3528afd55a40df4e22f6d065afb384
diff --git a/README.md b/README.md index 1037ab2e36..d4bbb2e5c2 100644 --- a/README.md +++ b/README.md @@ -1181,6 +1181,17 @@ cli.set_proxy_bearer_token_auth("pass"); > [!NOTE] > OpenSSL is required for Digest Authentication. +#### Bypass the proxy for specific hosts (`NO_PROXY`) + +```cpp +cli.set_no_proxy({"inter...
[ "README.md", "docs-src/pages/en/cookbook/c16-proxy.md", "docs-src/pages/ja/cookbook/c16-proxy.md", "httplib.h", "test/test.cc" ]
[]
diff --git a/test/test.cc b/test/test.cc index e9683222b7..6f64a1c924 100644 --- a/test/test.cc +++ b/test/test.cc @@ -18276,3 +18276,600 @@ TEST(KeepAliveTest, DeleteWithoutContentLengthDoesNotEatNextRequest) { EXPECT_EQ(2, delete_count.load()); } + +namespace no_proxy_test { + +// Server bound to 127.0.0.1:<dyn...
true
yhirose/cpp-httplib
2,460
issue_to_patch
Fix #2458: send body when no 100 Continue arrives over TLS
## Problem `Client::Put`/`Post` with a body of at least `CPPHTTPLIB_EXPECT_100_THRESHOLD` (1024) bytes auto-adds `Expect: 100-continue`. Over TLS, this could fail with `Failed to read connection` (#2458): the server received the request but the client never sent the body. ## Root cause The 100-continue wait decided ...
c86c192f3e86ab2ccb5062c070274102a64780c3
25622658093bdfc1aed9fa254e999980fe3c132f
diff --git a/httplib.h b/httplib.h index 0e7e2aaceb..66d4c2fd84 100644 --- a/httplib.h +++ b/httplib.h @@ -13810,13 +13810,28 @@ inline bool ClientImpl::process_request(Stream &strm, Request &req, } #endif - // Handle Expect: 100-continue with timeout - if (expect_100_continue && CPPHTTPLIB_EXPECT_100_TIMEOUT_M...
[ "httplib.h", "test/test.cc" ]
[]
diff --git a/test/test.cc b/test/test.cc index 8c5f5fdcde..03ac254688 100644 --- a/test/test.cc +++ b/test/test.cc @@ -13675,6 +13675,110 @@ TEST(Expect100ContinueTest, ServerClosesConnection) { } #endif +#if defined(CPPHTTPLIB_OPENSSL_SUPPORT) && !defined(_WIN32) +// Regression test for #2458. +// +// A large requ...
true
yhirose/cpp-httplib
2,459
issue_to_patch
Fix: "warning : missing field * initializer"
When compiling on Windows using clang 22 (C++20) with "Warning Level 4" (/W4), the following warning appears: "httplib.h(5733,29): warning : missing field 'InternalHigh' initializer [-Wmissing-field-initializers]" "httplib.h(5742,28): warning : missing field 'ai_family' initializer [-Wmissing-field-initializers]" <i...
008e107d0fcddee7cb96dc5ad3c3189fd090e40a
0c9229806760a885c6aab7868020da2aa6832cef
diff --git a/httplib.h b/httplib.h index 0e7e2aaceb..8199b6ca57 100644 --- a/httplib.h +++ b/httplib.h @@ -5730,7 +5730,7 @@ inline int getaddrinfo_with_timeout(const char *node, const char *service, #ifdef _WIN32 // Windows-specific implementation using GetAddrInfoEx with overlapped I/O - OVERLAPPED overlapped ...
[ "httplib.h" ]
[]
true
yhirose/cpp-httplib
2,453
issue_to_patch
Fix `zstd` detection in installed `httplibConfig.cmake`
PR #2334 fixed `zstd` detection in [`CMakeLists.txt`](https://github.com/yhirose/cpp-httplib/blob/b1cc8095a8feca1b99e296ef78eddd312e80d2c6/CMakeLists.txt#L258), but the installed package config still uses the previous logic in `cmake/httplibConfig.cmake.in`. As a result, `find_package(httplib REQUIRED)` can still fa...
b1cc8095a8feca1b99e296ef78eddd312e80d2c6
1b194cfe7c89a474656036b4e4782d1dbdcf38c1
diff --git a/cmake/httplibConfig.cmake.in b/cmake/httplibConfig.cmake.in index 933862a5e0..bffcd83c52 100644 --- a/cmake/httplibConfig.cmake.in +++ b/cmake/httplibConfig.cmake.in @@ -61,7 +61,7 @@ if(@HTTPLIB_IS_USING_ZSTD@) if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED) set(httplib_fd_zstd_required_arg REQUIRED) ...
[ "cmake/httplibConfig.cmake.in" ]
[]
true
yhirose/cpp-httplib
2,455
issue_to_patch
Fix iOS build break and modernize macOS Keychain cert loading
## Summary - Replace deprecated `SecTrustCopyAnchorCertificates` with `SecTrustSettingsCopyCertificates`, iterating over the System/Admin/User trust domains - Restrict the `CPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN` auto-enable and `Security.h` include guards from `TARGET_OS_MAC` (true on all Apple platforms) to `TARGE...
b1cc8095a8feca1b99e296ef78eddd312e80d2c6
88a92152d343cbad5b5b6bc6f25221d966f828b5
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 38787cc214..d0e41c38c9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -250,6 +250,54 @@ jobs: - name: build and run ThreadPool test run: cd test && make test_thread_pool && ./test_thread_pool + ...
[ ".github/workflows/test.yaml", "httplib.h" ]
[]
true
yhirose/cpp-httplib
2,456
issue_to_patch
ci: add best-effort BoringSSL job
## Summary Adds first-class CI coverage for BoringSSL as a best-effort TLS backend, on both Linux and macOS, plus the small code/test/docs adjustments that fall out of supporting it. ## What's in the PR **CI jobs** (`.github/workflows/test.yaml`) - `ubuntu-boringssl` and `macos-boringssl` build BoringSSL from source...
0d7d6374666956c9f5e2767573fb7be0d4477d16
9b67c9833a11f63168e0eeef59f3489cb4753e1e
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d0e41c38c9..ea50f94cd3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -120,6 +120,155 @@ jobs: - name: build and run ThreadPool test run: cd test && make test_thread_pool && ./test_thread_pool +...
[ ".github/workflows/test.yaml", "README.md", "test/test.cc" ]
[]
diff --git a/test/test.cc b/test/test.cc index f09bde914b..e9683222b7 100644 --- a/test/test.cc +++ b/test/test.cc @@ -10673,8 +10673,20 @@ TEST(SSLClientServerTest, TlsVerifyHostname) { << "Verify callback should have been called"; // CN="Common Name" should match our test certificate + // + // BoringSSL...
true
yhirose/cpp-httplib
2,451
issue_to_patch
Specifying "Server::stop()" as noexcept
The current implementation of `Server::stop()` doesn't throw an exception, so why not specify this explicitly?
28f8264d134a576422cd0f99f19719c2749d9e47
4d401d2f62de629a7a54da717f2d4240da55659a
diff --git a/httplib.h b/httplib.h index 539de5bac6..7c924e6a65 100644 --- a/httplib.h +++ b/httplib.h @@ -1597,7 +1597,7 @@ class RegexMatcher final : public MatcherBase { std::regex regex_; }; -int close_socket(socket_t sock); +int close_socket(socket_t sock) noexcept; ssize_t write_headers(Stream &strm, con...
[ "httplib.h" ]
[]
true
yhirose/cpp-httplib
2,445
issue_to_patch
ThreadPool constructor might fail when pthread_create fails leaving threads unjoined We are using httplib in duckdb, and we are super happy with it. In an experimental branch, I try to use `httplib`'s `ThreadPool`, but I found out that when (due to resource exhaustion in the system I was running the tests) pthread_cr...
Make ThreadPool ctor exception-safe on partial thread creation
## Summary - Wrap `ThreadPool` constructor's spawn loop with try/catch (under `#ifndef CPPHTTPLIB_NO_EXCEPTIONS`); on failure, signal shutdown to already-created workers, join them, then rethrow. Without this, a `std::thread` construction failure mid-loop (e.g., `pthread_create` returns `EAGAIN` under thread-resource p...
a1fdc07f34ef4788b24c7be3c3fb41a402409662
0e02c8de71983b7d7fa43d9ac4b8372fc07e2650
diff --git a/httplib.h b/httplib.h index d400c7bca8..f68ad84961 100644 --- a/httplib.h +++ b/httplib.h @@ -10047,9 +10047,29 @@ inline ThreadPool::ThreadPool(size_t n, size_t max_n, size_t mqr) #endif max_thread_count_ = max_n == 0 ? n : max_n; threads_.reserve(base_thread_count_); - for (size_t i = 0; i < base...
[ "httplib.h", "test/Makefile", "test/test_thread_pool.cc" ]
[]
diff --git a/test/Makefile b/test/Makefile index f449f2054d..9441e36f89 100644 --- a/test/Makefile +++ b/test/Makefile @@ -202,8 +202,25 @@ test_split_no_tls : test.cc ../httplib.h httplib.cc Makefile $(CXX) -o $@ $(CXXFLAGS) test.cc httplib.cc $(TEST_ARGS_NO_TLS) # ThreadPool unit tests (no TLS, no compression ne...
true
yhirose/cpp-httplib
2,443
issue_to_patch
Guard nullptr res in KeepAliveTest proxy template
## Summary `KeepAliveTest` (template in `test/test_proxy.cc`) calls `cli.Get(...)` and immediately dereferences `res` without a `nullptr` check. When the upstream request to `httpbingo.org` transiently fails (network blip / proxy hiccup), `res` is `nullptr` and the next line crashes the test process with a SEGV inside...
eb49a304b6ecbb200e94e720446ae540067ea9a4
ce97df0a923400c331a117d4eb940d62598b0cda
[ "test/test_proxy.cc" ]
[]
diff --git a/test/test_proxy.cc b/test/test_proxy.cc index 0cfb489abc..54198f5b1d 100644 --- a/test/test_proxy.cc +++ b/test/test_proxy.cc @@ -291,10 +291,12 @@ template <typename T> void KeepAliveTest(T &cli, bool basic) { { auto res = cli.Get("/get"); + ASSERT_TRUE(res != nullptr); EXPECT_EQ(StatusC...
true
yhirose/cpp-httplib
2,442
issue_to_patch
Use vswhere to locate VS install in 32-bit Windows CI
## Summary - The hosted `windows-latest` runner is being migrated from VS 2022 to VS 2026 (annotation in current runs: *NOTICE: windows-2025 requests are being redirected to windows-2025-vs2026 by 2026-05-12*). - `.github/workflows/test-32bit.yml` hardcoded `C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\...
a9bfe5914b2c00415a818d62a43b462d93e08a64
0d7c42bfa7eccda6a6805750a04cdfcd24b4434c
diff --git a/.github/workflows/test-32bit.yml b/.github/workflows/test-32bit.yml index 2fa0337152..45d3393b4b 100644 --- a/.github/workflows/test-32bit.yml +++ b/.github/workflows/test-32bit.yml @@ -21,7 +21,8 @@ jobs: - name: Build (Win32) shell: cmd run: | - call "C:\Program Files\Mi...
[ ".github/workflows/test-32bit.yml" ]
[]
true
yhirose/cpp-httplib
2,439
issue_to_patch
Re-enable getaddrinfo_a with worker-completion wait (#2431)
## Summary 5ebbfee dropped the Linux/glibc `getaddrinfo_a` branch to eliminate the use-after-free reported in #2431. That sidestepped the bug but lost the async DNS resolution feature. This PR restores the branch with the actually-correct fix. The use-after-free pattern was: 1. `getaddrinfo_a(GAI_NOWAIT, ...)` schedu...
c2678f0186dbcbac8230b302c56f4d29ab820ea8
07b0ac7f2c9f186e826b4001fc0e955edfe15a35
diff --git a/httplib.h b/httplib.h index d69c007996..c19c210cce 100644 --- a/httplib.h +++ b/httplib.h @@ -5906,17 +5906,52 @@ inline int getaddrinfo_with_timeout(const char *node, const char *service, *res = result_addrinfo; return 0; +#elif defined(_GNU_SOURCE) && defined(__GLIBC__) && ...
[ "httplib.h" ]
[]
true
yhirose/cpp-httplib
2,438
issue_to_patch
mmap CreateFile2 without FILE_SHARE_WRITE Hi, I have the following issue using the httplib server on win32. When using Server::set_mount_point, httplib opens the file in mmap with the following line: `File_ = ::CreateFile2(wpath.c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, NULL);` - GENERIC_READ the right ...
Fix #2435: allow mmap to open files held open for writing
## Summary - Add `FILE_SHARE_WRITE` to the share mode passed to `::CreateFile2` in `detail::mmap::open` so a file held open by another process for writing (e.g. an active log file) can still be served by the static-file mount path on Windows. Without this, `CreateFile2` fails with `ERROR_SHARING_VIOLATION` because the...
0cbeafe6a4026e0ebf890d8e779dca65d8e0a3b9
a838ccf4dbe2d66564d5f1d3b8ba182354713813
diff --git a/httplib.h b/httplib.h index 7cf8c45471..d69c007996 100644 --- a/httplib.h +++ b/httplib.h @@ -5319,8 +5319,9 @@ inline bool mmap::open(const char *path) { auto wpath = u8string_to_wstring(path); if (wpath.empty()) { return false; } - hFile_ = ::CreateFile2(wpath.c_str(), GENERIC_READ, FILE_SHARE_R...
[ "httplib.h", "test/test.cc" ]
[]
diff --git a/test/test.cc b/test/test.cc index c708e79fb3..4a78198682 100644 --- a/test/test.cc +++ b/test/test.cc @@ -7939,6 +7939,31 @@ TEST(MountTest, MultibytesPathName) { EXPECT_EQ(U8("日本語コンテンツ"), res->body); } +#ifdef _WIN32 +// Issue #2435: mmap::open() must succeed even when another handle holds +// the f...
true
yhirose/cpp-httplib
2,437
issue_to_patch
Add client fuzzing harness
Cover client request processing logic. The goal is to enable this running on OSS-Fuzz.
5ebbfeef0bf8e26b41036a2033fd391e05d5639f
a2f1538e8290b45a1fd7948f99843d21267356e3
[ "test/fuzzing/Makefile", "test/fuzzing/client_fuzzer.cc" ]
[]
diff --git a/test/fuzzing/Makefile b/test/fuzzing/Makefile index 7f0b4dab71..da5d696825 100644 --- a/test/fuzzing/Makefile +++ b/test/fuzzing/Makefile @@ -13,7 +13,7 @@ ZLIB_SUPPORT = -DCPPHTTPLIB_ZLIB_SUPPORT -lz BROTLI_DIR = /usr/local/opt/brotli # BROTLI_SUPPORT = -DCPPHTTPLIB_BROTLI_SUPPORT -I$(BROTLI_DIR)/includ...
true
yhirose/cpp-httplib
2,436
issue_to_patch
Fix #2431: drop getaddrinfo_a path (stack-use-after-free)
## Summary Fix for #2431. Replaces the closed #2434 (auto-closed when its base branch `issue-2431-repro` was deleted on merge of #2433). The Linux/glibc branch of `detail::getaddrinfo_with_timeout()` used `getaddrinfo_a(GAI_NOWAIT)` with a stack-local `struct gaicb`. When `gai_suspend()` hit the connection timeout th...
d14e4fc05f8576c553b0888270e85abf4069841f
b7f3da4e0535c9e990672ba019549a6f95c4a219
diff --git a/httplib.h b/httplib.h index bb2417e6ac..68daf5537c 100644 --- a/httplib.h +++ b/httplib.h @@ -5905,58 +5905,17 @@ inline int getaddrinfo_with_timeout(const char *node, const char *service, *res = result_addrinfo; return 0; -#elif defined(_GNU_SOURCE) && defined(__GLIBC__) && ...
[ "httplib.h" ]
[]
true
yhirose/cpp-httplib
2,433
issue_to_patch
Reproducer test for #2431 (getaddrinfo_a use-after-free)
## Summary Adds a CI-gated reproducer for #2431 — the use-after-free in `detail::getaddrinfo_with_timeout()` on Linux/glibc when `gai_suspend()` hits the connection timeout and the non-blocking `gai_cancel()` returns `EAI_NOTCANCELED`, leaving the resolver worker thread writing into the destroyed stack frame after the...
33bc1df930363e73fb1fd97f8d475e4272b1f221
aec17168b204ba4685ad8d96fc0413a04e2334ca
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 69cc8d7463..12bee95bb9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -114,6 +114,92 @@ jobs: - name: build and run ThreadPool test run: cd test && make test_thread_pool && ./test_thread_pool + ...
[ ".github/workflows/test.yaml", "test/dns_test_fixture.py", "test/run_issue_2431_repro.sh", "test/test.cc" ]
[]
diff --git a/test/dns_test_fixture.py b/test/dns_test_fixture.py new file mode 100755 index 0000000000..3bb55ca133 --- /dev/null +++ b/test/dns_test_fixture.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python3 +"""Delayed UDP responder used as a loopback test fixture. + +This is a self-contained test fixture for the GetAddrInfo...
true
yhirose/cpp-httplib
2,428
issue_to_patch
Fix #2427
This pull request improves the reliability of the HTTP server in the test suite by ensuring that the server reads the entire HTTP request from the client before sending a response. This change prevents connection resets that can occur if the server closes the socket while unread request data remains in the kernel buffe...
b045ee7f6b434a85fd011e96e28c6d4abfb18788
0e989162b19586f24365bab065b82c2a0b6f57b5
[ "test/Makefile", "test/test.cc" ]
[]
diff --git a/test/Makefile b/test/Makefile index 40b208874a..eb32bf1ebb 100644 --- a/test/Makefile +++ b/test/Makefile @@ -18,6 +18,8 @@ ifneq ($(OS), Windows_NT) OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -lssl -lcrypto MBEDTLS_SUPPORT = -DCPPHTTPLIB_MBEDTLS_SUPPORT -lmbedtls -lmbedx509 -lmbedcrypto WOLFS...
true
yhirose/cpp-httplib
2,430
issue_to_patch
fix #2429
When SSL_read() returns 0 after receiving a close_notify alert, tls::read() incorrectly returned -1, making clean peer shutdown indistinguishable from a read error. This broke HTTP responses using Connection: close without Content-Length, where the connection close signals end-of-body. Return 0 for PeerClosed to preser...
b045ee7f6b434a85fd011e96e28c6d4abfb18788
f066189b23a5b7461536759bbf22b57ee540d2b0
diff --git a/httplib.h b/httplib.h index c5ae2c8a0e..e2236879ed 100644 --- a/httplib.h +++ b/httplib.h @@ -16766,6 +16766,9 @@ inline ssize_t read(session_t session, void *buf, size_t len, TlsError &err) { auto ssl_err = SSL_get_error(ssl, ret); err.code = impl::map_ssl_error(ssl_err, err.sys_errno); + if (err...
[ "httplib.h", "test/test.cc" ]
[]
diff --git a/test/test.cc b/test/test.cc index 520a13b2dd..8abef8b266 100644 --- a/test/test.cc +++ b/test/test.cc @@ -14471,6 +14471,46 @@ TEST_F(SSLOpenStreamTest, PostChunked) { auto body = read_all(handle); EXPECT_EQ("Chunked SSL Data", body); } + +// RFC 7230 §3.3: a response body with neither chunked Trans...
true
yhirose/cpp-httplib
2,426
issue_to_patch
fix: cast len to 64 bits before right shift in ws
Fixes WebSocketIntegrationTest.LargeMessage and WebSocketIntegrationTest.MaxPayloadAtLimit on i386
ee5d15c8429db78a4206a9033b4245fdcbe3a28e
81371ccc0b3d7f976ab3336450fff7c78297f7c5
diff --git a/httplib.h b/httplib.h index 24a8f52e58..9d5107bfd8 100644 --- a/httplib.h +++ b/httplib.h @@ -4786,7 +4786,8 @@ inline bool write_websocket_frame(Stream &strm, ws::Opcode opcode, if (strm.write(reinterpret_cast<char *>(header), 2) < 0) { return false; } uint8_t ext[8]; for (int i = 7; i >= 0...
[ "httplib.h" ]
[]
true
yhirose/cpp-httplib
1,779
issue_to_patch
Use `final` keyword for devirtualization
Adding the `final` specifier may help compilers to optimize code by inlining. ([This article](https://devblogs.microsoft.com/cppblog/the-performance-benefits-of-final-classes/) explains devirtualization very well) `SSLServer` could also be final, but the test case `SSLClientServerTest.SSLConnectTimeout` should be modi...
ad40bd6a009c5fd237f2972987a528d59a8526ba
ffbb8de8f8864e83f206367786ebfb13f2c592f3
diff --git a/httplib.h b/httplib.h index f5436e2eb8..cabdb48b83 100644 --- a/httplib.h +++ b/httplib.h @@ -462,7 +462,7 @@ class DataSink { std::ostream os; private: - class data_sink_streambuf : public std::streambuf { + class data_sink_streambuf final : public std::streambuf { public: explicit data_si...
[ "httplib.h" ]
[]
true
yhirose/cpp-httplib
2,423
issue_to_patch
Removed deprecated APIs
This pull request primarily removes documentation and test references to deprecated APIs, specifically those related to SSL error handling and deprecated constructors. It also updates example code to use the current API for reporting SSL backend errors. The changes help clean up the codebase and documentation by removi...
c0248ff7fc1506c1bdd12a57cef4e2c5026032a7
6f375c47b3d003fe3c89d6ce4b70ca91cdb15078
diff --git a/README.md b/README.md index f6134a112d..5df1ce529e 100644 --- a/README.md +++ b/README.md @@ -1564,10 +1564,6 @@ Include `httplib.h` before `Windows.h` or include `Windows.h` by defining `WIN32 > [!NOTE] > cpp-httplib officially supports only the latest Visual Studio. It might work with former versions o...
[ "README.md", "docs-src/pages/en/cookbook/c18-ssl-errors.md", "docs-src/pages/ja/cookbook/c18-ssl-errors.md", "example/client.cc", "httplib.h", "test/test.cc" ]
[]
diff --git a/test/test.cc b/test/test.cc index 5a77651046..79bddab3e0 100644 --- a/test/test.cc +++ b/test/test.cc @@ -16587,41 +16587,6 @@ TEST(BindServerTest, UpdateCerts) { EVP_PKEY_free(key); } -// Test that SSLServer(X509*, EVP_PKEY*, X509_STORE*) constructor sets -// client CA list correctly for TLS handsha...
true
yhirose/cpp-httplib
2,420
issue_to_patch
The new added WebSocketIntegrationTest.SocketSettings fails This is to bring #2414 up to live. I cannot reopen that one as: > You do not have permissions to reopen this issue tl;dr The server runs on `::1` (ie. ipv6 *only*): https://github.com/yhirose/cpp-httplib/blob/ca82c93772c7374528ee4c30b3b0d4fa1e4d62ff/test/tes...
test: WebSocketIntegrationTest.SocketSettings: do not set AF_INET
The server listens on `AF_INET6` only (`::1`), so the test fails: ``` [ RUN ] WebSocketIntegrationTest.SocketSettings test/test.cc:17160: Failure Value of: client.connect() Actual: false Expected: true ``` Fixes #2419.
ca82c93772c7374528ee4c30b3b0d4fa1e4d62ff
33be7461a67a3a1e9bc2e1b58dfc01f80d04d6aa
[ "test/test.cc" ]
[]
diff --git a/test/test.cc b/test/test.cc index 299b0ee711..f2e8b7c488 100644 --- a/test/test.cc +++ b/test/test.cc @@ -17450,7 +17450,6 @@ TEST_F(WebSocketIntegrationTest, SocketSettings) { ws::WebSocketClient client("ws://localhost:" + std::to_string(port_) + "/ws-echo"); client.set...
true
yhirose/cpp-httplib
2,390
issue_to_patch
[cmake] Allow using pre-existing zstd target if it exists
adds support for pre-existing `zstd::libzstd` which is useful for projects that bundle their own zstd in a way that doesn't get caught by `CONFIG` Signed-off-by: crueter <crueter@eden-emu.dev>
831b64bdebd76faa001cacefe0cb5d8223351a84
fc473b301961cb3f7b66e21d5651d7d2f713e836
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1874e36be0..d3d8c29491 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -242,27 +242,33 @@ endif() # zstd < 1.5.6 does not provide the CMake imported target `zstd::libzstd`. # Older versions must be consumed via their pkg-config file. if(HTTPLIB_REQUIRE_ZSTD) - f...
[ "CMakeLists.txt" ]
[ { "comment": "You should probably just wrap the whole block in an `if(TARGET zstd::libztsd)` instead of adding more vars.", "path": "CMakeLists.txt", "hunk": "@@ -241,28 +241,34 @@ endif()\n # NOTE:\n # zstd < 1.5.6 does not provide the CMake imported target `zstd::libzstd`.\n # Older versions must be c...
true
yhirose/cpp-httplib
2,390
comment_to_fix
[cmake] Allow using pre-existing zstd target if it exists
You should probably just wrap the whole block in an `if(TARGET zstd::libztsd)` instead of adding more vars.
831b64bdebd76faa001cacefe0cb5d8223351a84
fc473b301961cb3f7b66e21d5651d7d2f713e836
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1874e36be0..d3d8c29491 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -242,27 +242,33 @@ endif() # zstd < 1.5.6 does not provide the CMake imported target `zstd::libzstd`. # Older versions must be consumed via their pkg-config file. if(HTTPLIB_REQUIRE_ZSTD) - f...
[ "CMakeLists.txt" ]
[ { "comment": "You should probably just wrap the whole block in an `if(TARGET zstd::libztsd)` instead of adding more vars.", "path": "CMakeLists.txt", "hunk": "@@ -241,28 +241,34 @@ endif()\n # NOTE:\n # zstd < 1.5.6 does not provide the CMake imported target `zstd::libzstd`.\n # Older versions must be c...
true
yhirose/cpp-httplib
2,412
issue_to_patch
Add two new fuzzers
The goal is to increase code coverage by way of OSS-Fuzz. A recent code coverage report is available at https://storage.googleapis.com/oss-fuzz-coverage/cpp-httplib/reports/20260326/linux/report.html
32c82492dec964b6192f77ca47da86e284aa4a72
c57c247ff286f40c7b7b399c6b679b360b57ee1c
[ "test/fuzzing/Makefile", "test/fuzzing/header_parser_fuzzer.cc", "test/fuzzing/url_parser_fuzzer.cc" ]
[]
diff --git a/test/fuzzing/Makefile b/test/fuzzing/Makefile index b08ecd0848..7f0b4dab71 100644 --- a/test/fuzzing/Makefile +++ b/test/fuzzing/Makefile @@ -13,8 +13,10 @@ ZLIB_SUPPORT = -DCPPHTTPLIB_ZLIB_SUPPORT -lz BROTLI_DIR = /usr/local/opt/brotli # BROTLI_SUPPORT = -DCPPHTTPLIB_BROTLI_SUPPORT -I$(BROTLI_DIR)/inclu...
true
yhirose/cpp-httplib
2,403
issue_to_patch
"Building a Desktop LLM App with cpp-httplib"
c2bdb1c5c15adb8ffcf398702084eb52aed3757f
94a7e335f9e3ae5bfcc101613f4820ba4c6ab0c9
diff --git a/docs-src/pages/en/index.md b/docs-src/pages/en/index.md index 3fbfcb6e8d..90a3ebf1c4 100644 --- a/docs-src/pages/en/index.md +++ b/docs-src/pages/en/index.md @@ -18,8 +18,8 @@ Under the hood, it uses blocking I/O with a thread pool. It's not built for hand ## Documentation - [A Tour of cpp-httplib](tou...
[ "docs-src/pages/en/index.md", "docs-src/pages/en/llm-app/app.png", "docs-src/pages/en/llm-app/ch01-setup.md", "docs-src/pages/en/llm-app/ch02-rest-api.md", "docs-src/pages/en/llm-app/ch03-sse-streaming.md", "docs-src/pages/en/llm-app/ch04-model-management.md", "docs-src/pages/en/llm-app/ch05-web-ui.md",...
[]
diff --git a/docs-util/llm-app/test_book.sh b/docs-util/llm-app/test_book.sh new file mode 100755 index 0000000000..f6c0f4aca1 --- /dev/null +++ b/docs-util/llm-app/test_book.sh @@ -0,0 +1,561 @@ +#!/usr/bin/env bash +set -euo pipefail + +# ============================================================================= +...
true
yhirose/cpp-httplib
2,393
issue_to_patch
[cmake] Update modules.cmake to fix cmake error
Update modules.cmake to fix cmake error
ba0d0b82db7b844fdc39233d6f387d91c730fa3e
9f4a9d69989af3f4b4263ec127c5a36412751321
diff --git a/cmake/modules.cmake b/cmake/modules.cmake index bea44520cd..e654307150 100644 --- a/cmake/modules.cmake +++ b/cmake/modules.cmake @@ -10,7 +10,10 @@ if(HTTPLIB_BUILD_MODULES) target_sources(${PROJECT_NAME} PUBLIC - FILE_SET CXX_MODULES FILES + FILE_SET CXX_MODULES + BASE_DIRS + "${_httpl...
[ "cmake/modules.cmake" ]
[]
true
yhirose/cpp-httplib
2,396
issue_to_patch
Fix TLS cert verification bypass on proxy redirect introduced in #2165
9ced2f614d0815d1ffa63fcc840fcc11c80c8aa3
517ec32dd3af805708a8e2fad23a41e41cc455f1
diff --git a/httplib.h b/httplib.h index c3b21cd92b..cb87afdb75 100644 --- a/httplib.h +++ b/httplib.h @@ -12763,18 +12763,10 @@ inline bool ClientImpl::create_redirect_client( // Setup basic client configuration first setup_redirect_client(redirect_client); - // SSL-specific configuration for proxy envi...
[ "httplib.h" ]
[]
true
yhirose/cpp-httplib
2,388
issue_to_patch
Remove 32-bit limitation
ab3098f18bd78da2b67c135c18cf48702ea979cd
5be1d2c5e4def65695c0a8f125d568fa36046cf0
diff --git a/.github/workflows/test-32bit.yml b/.github/workflows/test-32bit.yml new file mode 100644 index 0000000000..2fa0337152 --- /dev/null +++ b/.github/workflows/test-32bit.yml @@ -0,0 +1,36 @@ +name: 32-bit Build Test + +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_d...
[ ".github/workflows/test-32bit.yml", ".github/workflows/test.yaml", "CMakeLists.txt", "README.md", "httplib.h", "test/test_32bit_build.cpp" ]
[]
diff --git a/test/test_32bit_build.cpp b/test/test_32bit_build.cpp new file mode 100644 index 0000000000..c616e85661 --- /dev/null +++ b/test/test_32bit_build.cpp @@ -0,0 +1,9 @@ +#include "../httplib.h" + +int main() { + httplib::Server svr; + httplib::Client cli("localhost", 8080); + (void)svr; + (void)cli; + re...
true
yhirose/cpp-httplib
2,385
issue_to_patch
Fix #2383
74807d24a73419dc49e711cb64bfb5de4800810a
797587caccab74ada4e646b0b55316f7df20e8e4
diff --git a/httplib.h b/httplib.h index 0417a45879..a5e2e893b4 100644 --- a/httplib.h +++ b/httplib.h @@ -575,6 +575,14 @@ inline unsigned char to_lower(int c) { return table[(unsigned char)(char)c]; } +inline std::string to_lower(const std::string &s) { + std::string result = s; + std::transform( + resul...
[ "httplib.h" ]
[]
true