You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
In a lerna project setup, when multiple packages depend on funfix-effect (IO), combining IO's from those packages leads to an infinite loop here: https://github.com/funfix/funfix/blob/master/packages/funfix-effect/src/io.ts#L2200.
This is caused by the fact that different lerna packages load different funfix-core module instances and different Try constructors so instanceof doesn't work.
This affects only development stage when packages are linked and can be worked around by using lerna's hoisting feature, so duplicate funfix packages will be moved to top level node_modules folder.
In a lerna project setup, when multiple packages depend on
funfix-effect
(IO
), combining IO's from those packages leads to an infinite loop here: https://github.com/funfix/funfix/blob/master/packages/funfix-effect/src/io.ts#L2200.This is caused by the fact that different lerna packages load different
funfix-core
module instances and differentTry
constructors soinstanceof
doesn't work.This affects only development stage when packages are linked and can be worked around by using lerna's hoisting feature, so duplicate
funfix
packages will be moved to top levelnode_modules
folder.Some ideas to settle this
Throw an error in default switch branch here: https://github.com/funfix/funfix/blob/master/packages/funfix-effect/src/io.ts#L2274 with an explanation of the issue, so at least developers know how to workaround it. As CONS - exhaustivity check will be lost for this switch statement :(, may be covered by tests.
Add a warning note in IO's documentation to inform developers about potential issue
Related issue: lerna/lerna#1451 (hosting is not an option for thit guy)
Here https://github.com/lostintime/funfix-lerna-loop is an example repo to reproduce it.
I'm not sure any action should be taken, let's discuss.
The text was updated successfully, but these errors were encountered: