Skip to content

fix(customFormatter): properly accessing ref value during debugger #12948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

edison1105
Copy link
Member

close #12946

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB 38.1 kB 34.3 kB
vue.global.prod.js 158 kB 58 kB 51.6 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.5 kB 18.2 kB 16.7 kB
createApp 54.6 kB 21.3 kB 19.4 kB
createSSRApp 58.8 kB 23 kB 21 kB
defineCustomElement 59.4 kB 22.9 kB 20.8 kB
overall 68.6 kB 26.4 kB 24.1 kB

Copy link

pkg-pr-new bot commented Feb 26, 2025

Open in Stackblitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@12948

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@12948

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@12948

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@12948

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@12948

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@12948

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@12948

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@12948

@vue/shared

npm i https://pkg.pr.new/@vue/shared@12948

vue

npm i https://pkg.pr.new/vue@12948

@vue/compat

npm i https://pkg.pr.new/@vue/compat@12948

commit: 52b8413

@edison1105 edison1105 added ready to merge The PR is ready to be merged. 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Feb 26, 2025
return [
'div',
{},
['span', vueStyle, genRefFlag(obj)],
'<',
// avoid debugger accessing value affecting behavior
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me wonder if it wasn't intentional to completely avoid calling the getter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was originally obj.value, but it was changed to the current implementation in https://github.com/vuejs/core/pull/10397/files#diff-95f4e5cf8305f906512f733429443451392894309ce012c5a70216f9e578738eL41. I think this change may not have considered the case where the value of ._value is undefined when .value is not accessed. So I think we should continue using obj.value, but not track it.

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me. I thought that maybe displaying undefined for a value that was never accessed before was the expected behavior

@mrleblanc101
Copy link

This is a major pain for debugging, I hope this gets merged soon

@edison1105 edison1105 merged commit fdbd026 into main Mar 14, 2025
15 checks passed
@edison1105 edison1105 deleted the edison/fix/customFormatter branch March 14, 2025 00:19
@mrleblanc101
Copy link

Yass, thanks 🙌

@mrleblanc101
Copy link

@edison1105
Can we expect this to be publish in a new version soon-ish ?
Since it's been 4 months since the last Vue path version

@edison1105
Copy link
Member Author

@mrleblanc101
We are planning to release the next version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. ready to merge The PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom formatter doesn't print ref value properly
3 participants