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

Css_Legacy_Core.ml:1616:17-39 This function is a curried function where an uncurried function is expected #463

Closed
misogihagi opened this issue Apr 4, 2024 · 3 comments

Comments

@misogihagi
Copy link

I am new to rescript.
When I wanted to use styled-components with rescript, I found this repository.

Then running npm create rescript-app like following

◇ Select a template
│ Vite
◇ ReScript version?
│ 11.0.1
◇ ReScript Core version?
│ 1.2.0

npm install @davesnx/styled-ppx and editing rescript.json

{
  "name": "test",
  "sources": [
    {
      "dir": "src",
      "subdirs": true
    }
  ],
  "package-specs": [
    {
      "module": "es6",
      "in-source": true
    }
  ],
  "suffix": ".res.mjs",
  "bs-dependencies": [
    "@rescript/core",
    "@rescript/react",
    "@davesnx/styled-ppx/css",
    "@davesnx/styled-ppx/emotion"
  ],
  "ppx-flags": ["@davesnx/styled-ppx/ppx"],
  "bsc-flags": [
    "-open RescriptCore"
  ],
  "jsx": {
    "version": 4
  }
}

I encountered the following error

> rescript -w

>>>> Start compiling
Dependency on @rescript/core
Dependency on @rescript/react
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:1616:17-39

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

FAILED: cannot make progress due to previous errors.

How can I solve this problem?

@zakybilfagih
Copy link
Collaborator

Currently, only the library only supports ReScript v10 and v9. So you will need to downgrade your ReScript version.

@davesnx
Copy link
Owner

davesnx commented Apr 4, 2024

Indeed, styled-ppx doesn't support ReScript v11 yet. I made to peerDepend on v9 or v10 in the package.json: https://github.com/davesnx/styled-ppx/blob/main/package.json#L29 so you might have seen a warning when installing.

This is the task related with v11: #415

@misogihagi
Copy link
Author

currently, It works on this dependencies:

  "dependencies": {
    "@rescript/core": "0.7.0",
    "@rescript/react": "0.11.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "rescript": "^10.1.4"
  },

but styled components does not work by the other reason...

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