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

Runtime error when used with BuckleScript 8.1.0 #85

Closed
gaku-sei opened this issue Jun 23, 2020 · 3 comments · Fixed by #88
Closed

Runtime error when used with BuckleScript 8.1.0 #85

gaku-sei opened this issue Jun 23, 2020 · 3 comments · Fixed by #88
Labels
bug Something isn't working

Comments

@gaku-sei
Copy link

gaku-sei commented Jun 23, 2020

The new BS version seems to break, at runtime, the wonka take function:
Capture d’écran 2020-06-23 à 11 55 23

The generated code for the take function looks something like this:

if (state.taken < max) {
  if (signal) {
    state.taken = max;
    return state.talkback(/* Close */1); // Breaks here
  } else {
    return state.talkback(/* Pull */0);
  }
}

When logging, the stage.talkback propery is indeed undefined 😞

@kitten kitten added the bug Something isn't working label Jun 23, 2020
@BlueHotDog
Copy link

Tried looking at this, how this can even happen? isnt the whole point of Reasonml is to avoid such issues?

@kitten
Copy link
Member

kitten commented Jun 24, 2020

@gaku-sei that’s pretty interesting! I can take a look at the BS changes, but can you send the affected code snippet over please so I can get an initial idea of why the talkback isn’t set?

@Austaras
Copy link
Contributor

Austaras commented Jun 27, 2020

@kitten the issue here is bs8 changed internal representation of variant from tag to TAG and 0 to _0 so dist need to be compiled with bs8 or it won't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants