Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An async callback that returns
Erron its first poll currently loses that error:AsyncResultMarkeronly forwards errors after aPendingresult. For example,Callback::new(|()| async { Err(error) })never reaches its error boundary, while yielding before the same error does.Handle both ready outcomes explicitly. A ready error goes through the existing synchronous callback scope and
throw_errorpath to its error boundary; only pending futures are spawned and resumed through the existing path. The initial synchronous poll remains so event handlers can still callprevent_defaultduring the event tick. No public API changes.Six regression tests cover ready/pending errors for
CallbackandListenerCallback, callback scope, synchronous and deferred event effects, successful results preserving an existing error, and the nearestErrorBoundaryrendering its fallback.Validation on native Windows MSVC with Rust 1.98.1, one Cargo job and one test thread:
cargo test --locked -p dioxus-core --lib --tests -- --test-threads=1: 143 passed.cargo test --locked -p dioxus-core --doc -- --test-threads=1: 69 passed, 7 ignored.cargo fmt -p dioxus-core --checkandgit diff --check: passed. Whole-workspace formatting could not run on this Windows host because its command exceeded the Windows command-length limit (error 206).-D warningsfails on untouched dependency code under this toolchain:useless_borrows_in_formattingincore-macro; allowing that lint then exposesmap_or_identityinhtml. Both were reproduced against the original production source.cargo clippy --locked -p dioxus-core --lib --tests -- -D warnings -A clippy::useless_borrows_in_formatting -A clippy::map_or_identitypasses. No lint configuration or unrelated source was changed. Repository CI uses its own pinned toolchains and has not yet been verified for this PR.AI assistance was used to investigate the source, implement the fix, and prepare regression tests. The reported results were verified in the local native environment.