Skip to content
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

BuckleScript 8.0.0 breaks listToArray / Promise.all #56

Closed
cknitt opened this issue Jun 17, 2020 · 5 comments
Closed

BuckleScript 8.0.0 breaks listToArray / Promise.all #56

cknitt opened this issue Jun 17, 2020 · 5 comments

Comments

@cknitt
Copy link
Contributor

cknitt commented Jun 17, 2020

The internal representation of lists changed in BuckleScript 8.0.0. Lists are now encoded as {hd, tl}, not as nested arrays anymore.

This breaks the functions listToArray and arrayToList and thereby all functions relying on them (Promise.all, Promise.race).

@bobzhang
Copy link

The listToArray and arrayToList seems to be interesting that we can absorb it in upstream

@jfrolich
Copy link

Why are these functions in this library? Isn't it better to use Belt.List.toArray and Belt.List.fromArray?

@aantron
Copy link
Owner

aantron commented Jun 17, 2020

Yes, I will switch the library to the Belt functions and do a release. I don't immediately recall why I added these implementations.

@aantron
Copy link
Owner

aantron commented Jun 18, 2020

The fixed version is now in npm as reason-promise@1.1.0. Thanks @cknitt for the report!

@cknitt
Copy link
Contributor Author

cknitt commented Jun 18, 2020

Thanks a lot @aantron! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants