signals icon indicating copy to clipboard operation
signals copied to clipboard

Addes recursive `.value` read detection in nested functions

Open XantreDev opened this issue 1 year ago • 6 comments

#552

XantreDev avatar Apr 05 '24 21:04 XantreDev

🦋 Changeset detected

Latest commit: 46a701f7dfe76f42c9a1fd8131eea670f41f1f22

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@preact/signals-react-transform Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Apr 05 '24 21:04 changeset-bot[bot]

Deploy Preview for preact-signals-demo ready!

Name Link
Latest commit 46a701f7dfe76f42c9a1fd8131eea670f41f1f22
Latest deploy log https://app.netlify.com/sites/preact-signals-demo/deploys/665b4ed849db430008146af1
Deploy Preview https://deploy-preview-553--preact-signals-demo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Apr 05 '24 21:04 netlify[bot]

I've didn't changed useSignals implementation. Don't know why test fails

XantreDev avatar Apr 05 '24 21:04 XantreDev

@rschristian I understood why test fails

It transforms unmanaged test to managed test. Which is not working, because of it do not uses queueMicrotask

https://github.com/XantreDev/signals/blob/46a701f7dfe76f42c9a1fd8131eea670f41f1f22/packages/react/runtime/test/browser/useSignals.test.tsx#L495-L527

https://github.com/XantreDev/signals/blob/46a701f7dfe76f42c9a1fd8131eea670f41f1f22/packages/react/runtime/test/browser/useSignals.test.tsx#L456-L458

Should I add workaround to fix transformation behavior?

Should this file even be transformed?

https://github.com/XantreDev/signals/blob/46a701f7dfe76f42c9a1fd8131eea670f41f1f22/karma.conf.js#L157-L169

XantreDev avatar Jun 01 '24 16:06 XantreDev

I'm not familiar w/ the React transform (or its tests) at all -- I haven't/don't use it.

@andrewiggins is the best person to ask really, I couldn't say.

rschristian avatar Jun 02 '24 02:06 rschristian

@rschristian I understood why test fails

It transforms unmanaged test to managed test. Which is not working, because of it do not uses queueMicrotask

https://github.com/XantreDev/signals/blob/46a701f7dfe76f42c9a1fd8131eea670f41f1f22/packages/react/runtime/test/browser/useSignals.test.tsx#L495-L527

https://github.com/XantreDev/signals/blob/46a701f7dfe76f42c9a1fd8131eea670f41f1f22/packages/react/runtime/test/browser/useSignals.test.tsx#L456-L458

Should I add workaround to fix transformation behavior?

Should this file even be transformed?

https://github.com/XantreDev/signals/blob/46a701f7dfe76f42c9a1fd8131eea670f41f1f22/karma.conf.js#L157-L169

@andrewiggins What is your thoughts about it?

XantreDev avatar Jun 02 '24 12:06 XantreDev

#582 should have you covered on this one, will close this one out as superseded by that one

JoviDeCroock avatar Jul 14 '24 07:07 JoviDeCroock