davesnx / styled-ppx

Type-safe styled components for ReScript, Melange and native with type-safe CSS
https://styled-ppx.vercel.app
BSD 2-Clause "Simplified" License
399 stars 31 forks source link

Bug in Css_Legacy_Core.ml #469

Closed nojaf closed 2 months ago

nojaf commented 2 months ago

Hello,

I'm trying out this project with ReScript v0.11. I followed the instructions on this page.

module StyledDiv = %styled.div(`
  color: red;
`)
Dependency on @davesnx/styled-ppx/css
rescript: [1/1] Css_Legacy_Core.cmj
FAILED: Css_Legacy_Core.cmj

  We've found a bug for you!
  packages/css/js/Css_Legacy_Core.ml:1614:17-39

  This function is a curried function where an uncurried function is expected

FAILED: cannot make progress due to previous errors.
Failure: /home/nojaf/projects/my-pkmn-rescript-app/node_modules/rescript/linux/ninja.exe 
Location: /home/nojaf/projects/my-pkmn-rescript-app/node_modules/@davesnx/styled-ppx/css/lib/bs
>>>> Finish compiling (exit: 1)

Am I doing something wrong or would this be a compatibility problem with the latest ReScript?

Also, do I need to install @emotion/react when using %styled.div?

davesnx commented 2 months ago

Hey @nojaf, currently styled-ppx doesn't support uncurry by default. Tracking the progress here: https://github.com/davesnx/styled-ppx/issues/415

Closing this