question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not work with Octane

See original GitHub issue

repro repo: https://github.com/NullVoxPopuli/octane-ember-concurrency-repro

npx ember-cli new my-app -b @ember/octane-app-blueprint --yarn
cd my-app
yarn ember install ember-concurrency

with the templtae:

<div {{did-insert (perform this.myTask)}}>
  boop
</div>
import Component from '@glimmer/component';
import { task } from 'ember-concurrency';

export default class MyComponent extends Component {
  @task myTask = function*() {
    console.log('my task');
  }
}

Uncaught (in promise) Error: Assertion Failed: The first argument passed to the `perform` helper should be a Task object (without quotes); you passed undefined

and then with ember-concurrency-decorators:

Uncaught (in promise) Error: Assertion Failed: @computed can only be used on empty fields. myTask has an initial value (e.g. `myTask = someValue`)

with this preferred syntax:

  @task * myTask() {
    console.log('my task');
  }

we get a babel error:

✖ 1 problem (1 error, 0 warnings)

Build Error (broccoli-persistent-filter:Babel > [Babel: e-concurrency]) in e-concurrency/components/my-component.js

.../components/my-component.js: Unexpected token (6:19)

  4 | 
  5 | export default class MyComponent extends Component {
> 6 |   @task * myTask() {
    |                    ^
  7 |     console.log('my task');
  8 |   }
  9 | 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
esbanarangocommented, Sep 9, 2019

Just adding to @muziejus comment… if you have a task that you use in multiple places:

Image 2019-09-09 at 5 52 35 PM
7reactions
NullVoxPopulicommented, Mar 25, 2019

looks like this is the current way to use generators with decorators:

import Component from '@glimmer/component';
import { task } from 'ember-concurrency';

export default class MyComponent extends Component {
  @task(function*() {
    console.log('my task');
  }) myTask;
// ...
Read more comments on GitHub >

github_iconTop Results From Across the Web

Not working displacement in Octane for Cinema 4D - iRender
Ways of troubleshooting not working displacement in Octane · 1. Ensure it is plugged in · 2. Check the texture itself · 3....
Read more >
Problem with Octane in C4D S24 - OTOY Forums • View topic
My problem is that, when I start the Cinema4d and i assign de the folder where the Demo of octane is, Cinema doesnt...
Read more >
I have been having a problem with motion blur in C4D today ...
I have been having a problem with motion blur in C4D today - It renders in the Live Viewer but does not render...
Read more >
Octane Render not working : r/Cinema4D - Reddit
Hey, I couldn't get octane to work with cinema 4D S24, it's not showing up at all. any help would be appreciated!
Read more >
Glimmer Components - Octane Upgrade Guide - Ember Guides
Arguments. In classic components, arguments are assigned directly to the class instance. This has caused a lot of issues over the years, from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found