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

Cannot define a component with a props case class exceeding 27 properties #540

Open
epifab opened this issue Dec 30, 2021 · 1 comment
Open
Milestone

Comments

@epifab
Copy link

epifab commented Dec 30, 2021

Scala version: 3.1.0
Slinky version: 0.7.0

object MyComponent extends ExternalComponentWithRefType[js.Object]:
  case class Props(
    p1: js.UndefOr[Int] = js.undefined,
    p2: js.UndefOr[Int] = js.undefined,
    p3: js.UndefOr[Int] = js.undefined,
    p4: js.UndefOr[Int] = js.undefined,
    p5: js.UndefOr[Int] = js.undefined,
    p6: js.UndefOr[Int] = js.undefined,
    p7: js.UndefOr[Int] = js.undefined,
    p8: js.UndefOr[Int] = js.undefined,
    p9: js.UndefOr[Int] = js.undefined,
    p10: js.UndefOr[Int] = js.undefined,
    p11: js.UndefOr[Int] = js.undefined,
    p12: js.UndefOr[Int] = js.undefined,
    p13: js.UndefOr[Int] = js.undefined,
    p14: js.UndefOr[Int] = js.undefined,
    p15: js.UndefOr[Int] = js.undefined,
    p16: js.UndefOr[Int] = js.undefined,
    p17: js.UndefOr[Int] = js.undefined,
    p18: js.UndefOr[Int] = js.undefined,
    p19: js.UndefOr[Int] = js.undefined,
    p20: js.UndefOr[Int] = js.undefined,
    p21: js.UndefOr[Int] = js.undefined,
    p22: js.UndefOr[Int] = js.undefined,
    p23: js.UndefOr[Int] = js.undefined,
    p24: js.UndefOr[Int] = js.undefined,
    p25: js.UndefOr[Int] = js.undefined,
    p26: js.UndefOr[Int] = js.undefined,
    p27: js.UndefOr[Int] = js.undefined,
    p28: js.UndefOr[Int] = js.undefined,
    p29: js.UndefOr[Int] = js.undefined,
  )

up to 27 properties it compiles with no issues.
with 28 properties it throws method summonAll is declared as erased, but is in fact used
from 29 properties it throws method deriveWriter in trait MacroWriters does not match type slinky.readwrite.Writer[MyComponent.Props]

@shadaj
Copy link
Owner

shadaj commented Dec 30, 2021

Thanks for the bug report @epifab!

@shadaj shadaj added this to the Backlog milestone Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants