Skip to content

signals: Rebuild stale global cache entries automatically#4809

Merged
jkelleyrtp merged 3 commits into
DioxusLabs:mainfrom
tekacs:rebuild-global-signal-on-type-mismatch
Jan 17, 2026
Merged

signals: Rebuild stale global cache entries automatically#4809
jkelleyrtp merged 3 commits into
DioxusLabs:mainfrom
tekacs:rebuild-global-signal-on-type-mismatch

Conversation

@tekacs

@tekacs tekacs commented Oct 18, 2025

Copy link
Copy Markdown
Contributor

When rebuilding with dx serve --hot-patch, changing the type of the value held in a GlobalSignal currently results in a panic, due to a downcast failure.

This patch causes the runtime to evict the existing value with a warning when that happens, rather than panicking.

I considered making the type part of the key, but this feels gentler, since this is a rare occurrence.

@tekacs tekacs requested a review from a team as a code owner October 18, 2025 10:19
@tekacs tekacs force-pushed the rebuild-global-signal-on-type-mismatch branch from 47f3910 to 0a530d0 Compare November 3, 2025 23:10
@tekacs tekacs force-pushed the rebuild-global-signal-on-type-mismatch branch 3 times, most recently from 6782111 to d5f29f0 Compare November 23, 2025 02:28
@tekacs tekacs force-pushed the rebuild-global-signal-on-type-mismatch branch from d5f29f0 to 2a07a27 Compare December 1, 2025 01:21
@jkelleyrtp jkelleyrtp merged commit 8b427dd into DioxusLabs:main Jan 17, 2026
19 checks passed
SilentVoid13 pushed a commit to SilentVoid13/dioxus that referenced this pull request May 21, 2026
…#4809)

* signals: Rebuild stale global cache entries automatically

* remove log

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants