Repository navigation
Commit 2290cc3
committed
fix(compiler): follow local aliases of module-level Intl formatters and suppress locale checks in updaters
Bug 1: A module-level implicit Intl formatter rebound to a local const
(e.g. const f = format) was not reported during render because the
resolveScope check required the use-site identifier to resolve in
moduleScope. Replace the scope-identity gate with a moduleLevel flag
set on the value object when first recorded at module scope, so aliases
at any depth inherit the flag through the same object reference.
Bug 2: OCTANE_STRONG_RENDER_LOCALE_FORMAT fired inside updaters and
reducers because those bodies are visited as render, but the code was
absent from IMPURE_MESSAGES so pureDiagnostic did not intercept it.
Locale and timezone are stable across replays on the same runtime, so
this is a false positive. Return false from pureDiagnostic for this
code to suppress the diagnostic entirely in pure callbacks.1 parent ca328ef commit 2290cc3
3 files changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1636 | 1636 | | |
1637 | 1637 | | |
1638 | 1638 | | |
| 1639 | + | |
1639 | 1640 | | |
1640 | 1641 | | |
1641 | 1642 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| |||
248 | 250 | | |
249 | 251 | | |
250 | 252 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 253 | + | |
256 | 254 | | |
257 | 255 | | |
258 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
0 commit comments