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

fontWeight broken in master #775

Open
cknitt opened this issue Oct 17, 2022 · 2 comments · Fixed by #776 · May be fixed by #806
Open

fontWeight broken in master #775

cknitt opened this issue Oct 17, 2022 · 2 comments · Fixed by #776 · May be fixed by #806

Comments

@cknitt
Copy link
Member

cknitt commented Oct 17, 2022

In master, we have

type fontWeight = [
  | #normal
  | #bold
  | #100
  ...
  | #900
]

Unfortunately, this is not correct. We need a string "100", not an int 100. But this can not be represented as an enum / polymorphic variant (#"100" just gets reformatted to #100, and as far as I can see it is not currently possible to represent the difference in the AST).

We could use an abstract type + an @obj external make with the @string annotation instead, but this usage of @string is likely to get deprecated in ReScript 11, too.

Any other ideas?

@cknitt
Copy link
Member Author

cknitt commented Oct 17, 2022

Created rescript-lang/syntax#689.

@cknitt
Copy link
Member Author

cknitt commented Mar 4, 2024

Just noticed that unfortunately fontWeight is broken again since #793.

@cknitt cknitt reopened this Mar 4, 2024
@cknitt cknitt linked a pull request Mar 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant