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

[BUG 2.15.0-beta] Closure actions can't receive primitive numbers #15470

Closed
cibernox opened this issue Jul 7, 2017 · 7 comments
Closed

[BUG 2.15.0-beta] Closure actions can't receive primitive numbers #15470

cibernox opened this issue Jul 7, 2017 · 7 comments

Comments

@cibernox
Copy link
Contributor

cibernox commented Jul 7, 2017

I found that you can't pass decimal or negative numbers to closure actions anymore:

Reproductions:
Twiddle: https://ember-twiddle.com/e255ab664fff5204791ed86577f0d7a1?openFiles=templates.application.hbs%2C
Other repo: https://github.com/cibernox/demo-error-closure-action

@cibernox cibernox changed the title [BUG Beta] 2.15.0-beta problem with closure actions [BUG 2.15.0-beta] Closure actions can't receive primitive numbers Jul 7, 2017
@machty
Copy link
Contributor

machty commented Jul 7, 2017

👍 , This is breaking ember-concurrency builds testing against beta https://travis-ci.org/machty/ember-concurrency/jobs/251041405

@machty
Copy link
Contributor

machty commented Jul 8, 2017

Specifically the ember-concurrency breakage is due to the following (from here):

<p>
  {{#press-and-hold-button
    press=(perform incrementBy -1)
    release=(cancel-all incrementBy)}}
      --Decrease
  {{/press-and-hold-button}}

  {{#press-and-hold-button
    press=(perform incrementBy 1)
    release=(cancel-all incrementBy)}}
      Increase++
  {{/press-and-hold-button}}
</p>

The raw 1 and -1 are the primitives causing the breakage. (The (perform) helper just casts a task to a closure action.)

@ef4
Copy link
Contributor

ef4 commented Jul 11, 2017

This also breaks liquid-fire's test suite. If anybody wants an easy test case, run the dummy app and visit /#/scenarios/model-dependent-rule/1

@rwjblue
Copy link
Member

rwjblue commented Aug 7, 2017

Thanks to @bekzod and @ef4's work over in glimmer-vm, #15572 has been submitted as a fix for this issue.

@rwjblue
Copy link
Member

rwjblue commented Aug 8, 2017

Can someone confirm that the latest canary builds (which will be published in ~ 15 minutes) fox the issue? I'll cherry pick the update into beta branch (and release a new beta) once confirmed...

@rwjblue rwjblue reopened this Aug 8, 2017
@ef4
Copy link
Contributor

ef4 commented Aug 8, 2017

I confirmed that canary fixes both liquid-fire's test suite and Miguel's reproduction.

@rwjblue
Copy link
Member

rwjblue commented Aug 8, 2017

Awesome, thank you for confirming @ef4!

I just pulled the fix into beta branch and published a build. I've also tagged and started publishing v2.15.0-beta.3 for those that are using this from npm.

I'm closing this for now, but I'd really appreciate it if everyone affected by this bug could test latest beta builds and confirm things are working properly now. There is only one week before 2.15.0 final, and I'd really like to ensure we don't release with this issue...

@rwjblue rwjblue closed this as completed Aug 8, 2017
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

4 participants