Description
Vue version
3.4.15
Link to minimal reproduction
Steps to reproduce
Open the link and see the maximum recursion error
What is expected?
No maximum recursion error
What is actually happening?
Maximum recursion error
System Info
System:
OS: macOS 14.1.1
CPU: (12) arm64 Apple M2 Max
Memory: 65.34 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
pnpm: 8.8.0 - ~/Library/pnpm/pnpm
Browsers:
Brave Browser: 120.1.61.120
Chrome: 120.0.6099.234
Safari: 17.1
Any additional comments?
I understand that computed properties should not have side effects, and this example does have a side effect, however there are some cases where classes/factories might modify some global reactive state for tracking purposes. In 3.4.14
and before this example works, but this breaks in 3.4.15
.
In an ideal world, obviously nobody would ever modify anything inside of a getter, making all getters "pure" functions. I don't know if this is necessarily a realistic requirement in the real world, especially if all previous versions of Vue 3 (whether intentionally or unintentionally) supported this.
I believe other people are possibly running into this issue:
#10210
#10172
#10158
I'm pretty confident that this PR introduced this behavior: #10123