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

Cross-build for Scala.js #351

Merged
merged 2 commits into from
Jul 7, 2021
Merged

Cross-build for Scala.js #351

merged 2 commits into from
Jul 7, 2021

Conversation

armanbilge
Copy link
Member

Cross-building Jawn to Scala.js is a stepping stone towards http4s/http4s#4938

This was almost entirely straightforward. I had to play a bit fast-and-loose with testing, due to different semantics on JS (namely lack of numerical types and much less strict indexing rules).

Thanks in advance!

@armanbilge
Copy link
Member Author

@djspiewak thanks for the review! Much appreciated. Mind triggering the CI again please? 😅

@armanbilge
Copy link
Member Author

Hope this can be merged/released soon-ish, so I can make a start on the next upstream PR to circe before finding my way back to http4s.

@travisbrown
Copy link
Contributor

@armanbilge What's the intention for a Circe PR? Circe already supports cross-platform parsing with circe-parser, which uses Jawn on the JVM and JSON.parse for JavaScript, and that's extremely unlikely to change.

@armanbilge
Copy link
Member Author

@travisbrown thanks for chiming in. My plan was to cross circe-jawn for JS as well so that I can fully cross the circe module in http4s. AFAICT the jawn parser supports features like stream decoding etc. that JSON.parse does not ... maybe for the browser this is nonsense, but many people seem interested in running http4s client/server on Node.js where I think this could be useful.

I don't think that circe-parser should change, but would it hurt to have a cross of circe-jawn available on JS for those who wish to use it? Thanks for your thoughts.

@travisbrown
Copy link
Contributor

@armanbilge Agreed, circe-fs2 for Scala.js does make sense, and I guess there's no reason not to do circe-jawn as well.

@armanbilge
Copy link
Member Author

Excellent!! I appreciate your support. PR forthcoming :)

@armanbilge
Copy link
Member Author

@rossabaker do you have a moment to review? Thanks!

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

This is likely to be a bad time for #340, but the approach and implementation look sound.

@armanbilge
Copy link
Member Author

I did see that, unfortunate! But #340 seems blocked by other things atm.

Thanks for the review! Now with 2 ✅ , any chance of a merge/release please? 😅

@rossabaker rossabaker merged commit 1cf6adc into typelevel:main Jul 7, 2021
@rossabaker
Copy link
Member

I'm not on a laptop that can do a release, but I'll see what I can do this week if nobody beats me to it.

@armanbilge
Copy link
Member Author

No worries, thank you!! Much much appreciated. Another PR coming your way in jawn-fs2.

@armanbilge
Copy link
Member Author

@rossabaker thank you very much for releasing! ❤️

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

Successfully merging this pull request may close these issues.

4 participants