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

roc glue doesn't support 5 or more tags in a recursive union #4554

Open
lukewilliamboswell opened this issue Nov 21, 2022 · 0 comments
Open
Labels
glue The `roc glue` command

Comments

@lukewilliamboswell
Copy link
Collaborator

Roc glue currently panics when you define 5 or more tags in a recursive union. This is due to the pointer tagging optimisation, and so glue will need to generate different code in this case.

luke@192-168-1-108 tui % roc glue platform/main.roc asdf.rs
thread 'main' panicked at 'not yet implemented: Support 5 tags in a recursive tag union on target_info TargetInfo { architecture: Aarch32, operating_system: Unix }. (This is too many tags for pointer tagging to work, so we need to generate different glue.)', crates/glue/src/rust_glue.rs:779:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
# TODO roc glue can't support more elements in this recusrive tage here yet
Elem : [
    Block BlockConfig,
    Paragraph ParagraphConfig,
    ListItems ListConfig,
    Layout (List Elem) LayoutConfig,
    SomeOtherWidget (List Elem), # Roc glue will work if we remove this Tag.
]
@lukewilliamboswell lukewilliamboswell added the glue The `roc glue` command label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
glue The `roc glue` command
Projects
None yet
Development

No branches or pull requests

1 participant