Repository navigation
fix(agera): drop the development warning about a signal written inside a computed - #266
Merged
Merged
Conversation
…e a computed A cache that creates an entry on its first read writes inside a computed on purpose: `CacheStorage.$get` of `@nano_kit/query` inserts the entry into its `SignalsMap` as the computed of a query evaluates, and the weather example printed six warnings on start, none of them about the application. The warnings about an effect or an effect scope created inside a computed stay.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #266 +/- ##
==========================================
- Coverage 83.67% 83.66% -0.02%
==========================================
Files 99 99
Lines 2628 2626 -2
Branches 590 589 -1
==========================================
- Hits 2199 2197 -2
Misses 295 295
Partials 134 134 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Sep 26, 2026
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.
Why
The development build of agera warned whenever a signal was written while a computed was evaluating. Libraries do that on purpose: a cache that creates an entry on its first read writes inside the computed that read it.
CacheStorage.$getof@nano_kit/queryinserts the entry into itsSignalsMapas the computed of a query evaluates, the signal of the entry and the version of the map, soexamples/weather/react-nano_kit-diprinted six warnings on start, none of them about the application. The check cannot tell such a write from a mistake in a computed of the application.What
signalOperis removed, with the specs insystem.spec.tsthat covered it.Size
Nothing changes in production: the check was behind
import.meta.env.DEV, and every size-limit entry of agera measuresdist/index.production.js. The development build loses the check and its message.Notes
tscof agera, the unit tests of agera, 194 and the expected failure that was there before, of kida, 100, of store, 74, and of query, 166. The pre-push hook was skipped on purpose: it runs the whole monorepo suite in parallel, which the dev machine does not survive. CI runs the rest.