Skip to content

Add modules to exposes in main.roc#22

Closed
rtfeldman wants to merge 3 commits intomainfrom
add-exposes
Closed

Add modules to exposes in main.roc#22
rtfeldman wants to merge 3 commits intomainfrom
add-exposes

Conversation

@rtfeldman
Copy link
Contributor

This should fix docs generation

This should fix docs generation
@Anton-4
Copy link
Collaborator

Anton-4 commented Mar 3, 2023

Posting the error here for easy viewing:

Run ./roc_nightly/roc build ./examples/env.roc

thread '<unnamed>' panicked at 'Ability specialization is unknown - code generation cannot proceed!', crates/compiler/mono/src/ir.rs:5829:30

@Anton-4
Copy link
Collaborator

Anton-4 commented Mar 29, 2023

Let's see if this error still occurs...

@Anton-4
Copy link
Collaborator

Anton-4 commented Mar 29, 2023

The error still occurs but is more specific now:

thread '<unnamed>' panicked at 'Ability specialization is unknown - code generation cannot proceed!: NoTypeImplementingSpecialization', crates/compiler/mono/src/ir.rs:5788:10

@rtfeldman
Copy link
Contributor Author

@ayazhafiz any idea what this error might be referring to?

@ayazhafiz
Copy link
Member

Is this a new error on this branch, or is this happening without the changes here as well?

The problem is that if we don't know what type to generate an ability specialization for, we cannot generate code (this is the "evil ability" pattern). Why that would be happening on this branch is not clear to me, unless the exposes types are having glue generated for them or something.

@Anton-4
Copy link
Collaborator

Anton-4 commented Apr 3, 2023

This only occurs with the changes here, could it be that the glue code needs to be updated?

@ayazhafiz
Copy link
Member

Ok, so probably glue is picking up the exposed types in EnvDecoding and attempting to generate code for them, which is a problem, since those types are not material until their ability variables are instantiated.

@rtfeldman
Copy link
Contributor Author

I can reproduce the error CI is getting locally by:

  1. Checking out the add-exposes branch of basic-cli locally
  2. Doing roc build examples/env.roc

It doesn't reproduce on the main branch of `basic-cli'.

@ayazhafiz maybe it has to do with platforms as opposed to applications, rather than glue vs build?

@rtfeldman
Copy link
Contributor Author

Closing in favor of #28

@rtfeldman rtfeldman closed this Jun 10, 2023
@rtfeldman rtfeldman deleted the add-exposes branch June 10, 2023 02:52
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

Successfully merging this pull request may close these issues.

3 participants