Skip to content

[pull] main from mobxjs:main#55

Merged
pull[bot] merged 2 commits into
code:mainfrom
mobxjs:main
Jun 8, 2026
Merged

[pull] main from mobxjs:main#55
pull[bot] merged 2 commits into
code:mainfrom
mobxjs:main

Conversation

@pull

@pull pull Bot commented Jun 8, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

dependabot Bot and others added 2 commits June 8, 2026 11:37
Bumps [changesets/action](https://github.com/changesets/action) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/changesets/action/releases)
- [Changelog](https://github.com/changesets/action/blob/main/CHANGELOG.md)
- [Commits](changesets/action@v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: changesets/action
  dependency-version: 1.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: @computed override with super no longer causes cycle detection

Fixes #4639 — when a child class @computed getter references super.value,
MobX no longer throws 'Cycle detected in computation'.

Architecture:
- Common case (no inheritance): factories stored in lazyComputedKeys_
  (identical to main branch), materialized on first read
- Inheritance case: parent entries moved to computedGetterEntries_ (Map
  keyed by getter function), child entries in computedEntries_
- readComputed_ method checks derivation === expectedGet to detect
  super calls and routes to the correct ComputedValue
- Prototype chain traversal + __mobx_get finds parent getter without
  per-instance WeakMap overhead
- getObservablePropValue_ kept clean (no expectedGet) for makeObservable

Performance vs main branch (50k instances × 10 computed getters):
  Heap:        +0.5%
  Construct:   -7.8%
  First-read:  -4.2%
  Re-read:     +6.6% (inherent cost of derivation check for super support)

* Revert "fix: @computed override with super no longer causes cycle detection"

This reverts commit a559575.

* Fix Stage 3 computed inheritance

* Simplify inheritance tests

* Document unsupported (for now) test

* Reorg tests

---------

Co-authored-by: Gorbachev Egor <7gorbachevm@gmail.com>
Co-authored-by: Сергей Волков <ser.volkov@vk.team>
@pull pull Bot locked and limited conversation to collaborators Jun 8, 2026
@pull pull Bot added the ⤵️ pull label Jun 8, 2026
@pull pull Bot merged commit 7fd9334 into code:main Jun 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant