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

Bug with rescript compilation #397

Closed
ashton opened this issue Dec 10, 2023 · 11 comments
Closed

Bug with rescript compilation #397

ashton opened this issue Dec 10, 2023 · 11 comments

Comments

@ashton
Copy link

ashton commented Dec 10, 2023

Hey! I've installed "@davesnx/styled-ppx": "^0.50.0", and when trying to run my project using rescript (10.1.4) with rescript-react (0.11.0), it shows the following error
image

It seems that the compilation of this line is generating triple quotes and thus, an invalid syntax in the .bs.js file.
Cursor_and_less

@lubegasimon
Copy link
Contributor

lubegasimon commented Dec 10, 2023

In the meantime, those can be fixed by manually escaping the quotes

@ashton
Copy link
Author

ashton commented Dec 10, 2023

Which quotes exactly? (version 0.40.1 is working perfectly)

@lubegasimon
Copy link
Contributor

lubegasimon commented Dec 10, 2023

Which quotes exactly?

For example; case """ : to case "\"":

@lubegasimon
Copy link
Contributor

(version 0.40.1 is working perfectly)

We shall investigate and fix what could be causing the regression. Thanks for the report

@ashton
Copy link
Author

ashton commented Dec 10, 2023

For example; case """: to case "\"":

but those are generated files, everytime I run a npm install this would be overwritten

@ashton
Copy link
Author

ashton commented Dec 10, 2023

Also, not sure if it's related, but the PPX itself is not being recognized by rescript:
image

@lubegasimon Do you want me to open another issue?

@lubegasimon
Copy link
Contributor

Also, not sure if it's related, but the PPX itself is not being recognized by rescript: image

@lubegasimon Do you want me to open another issue?

Yes, though it seems something is missing out during the installation. Does this -- https://styled-ppx.vercel.app/getting-started guide help?

@ashton
Copy link
Author

ashton commented Dec 10, 2023

I think I followed what the getting started said, not sure if something is off because is not a new installation but an upgrade:

image

@lubegasimon
Copy link
Contributor

lubegasimon commented Dec 19, 2023

It seems that the compilation of this line is generating triple quotes and thus, an invalid syntax in the .bs.js file

No, one occurrence is at

| {js|"|js} | {js|'|js} -> value

@davesnx
Copy link
Owner

davesnx commented Dec 20, 2023

I believe the issue has been fixed in main, but didn't release a npm package yet. Let me try to reproduce and double-check ReScript and release a 0.51

@davesnx
Copy link
Owner

davesnx commented Jan 30, 2024

Updated the https://github.com/davesnx/try-styled-ppx repository with ReScript 10 and styled-ppx 0.53 working nicely

@davesnx davesnx closed this as completed Jan 30, 2024
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

3 participants