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.

[Bug] 2.3.2 broke `observes` modifier

See original GitHub issue

🐞 Bug description

With the latest version of ember-concurrency the observes modifier stopped working.

import Model, { attr } from '@ember-data/model';
import { inject as service } from '@ember/service';
import { task } from 'ember-concurrency';

export default class Parking extends Model {
  @service store;

  @attr('array', { defaultValue: () => [] }) carIds;

  // This tasks should perform everytime `cardIds` changes.
  @task({
    observes: 'carIds.[]',
    drop: true,
  })
  *loadCarsTask() {
    // ...
  }
}
import Component from '@glimmer/component';
import { action, set } from '@ember/object';

export default class ParkingBox extends Component {
  @action
  onCarChange(cars) {
    const { parking } = this.args;
    const cardIds = cars.map(({ id }) => parseInt(id));

    set(parking, 'cardIds', cardIds);
  }
}

😕 Actual Behavior

loadCarsTask isn’t performing when carIds changes.

🤔 Expected Behavior

loadCarsTask should perform everytime cardIds changes.

🌍 Environment

  • ember-concurrency 2.3.2
  • ember-source 4.6.0
  • ember-data 4.2.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
machtycommented, Sep 2, 2022

@esbanarango Yes, I think it is probably not a good idea for us to try and fix this for the new API as it would add further complexity to the EC codebase to accommodate a deprecated pattern.

1reaction
machtycommented, Sep 2, 2022

Fixed in v2.3.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug :1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to users, ... and dev-java/lucene-analyzers-2.3.2 builds broken" status:RESOLVED ...
Read more >
Full Text Bug Listing - Red Hat Bugzilla
Hardware Environment: Software Environment: This bug report was opened specifically to submit the patch included in LTC Bug 1631 to Red Hat.
Read more >
ember-concurrency/CHANGELOG.md at master - GitHub
Implemented a public API for Task Modifiers, providing a way for users to define additional modifiers and behavior in application code. (#441) Please...
Read more >
Release Notes | Veertu's Anka Documentation
Bug Fix: anka registry pull would under certain conditions throw ZeroDivisionError: ... This results in a broken VM. ... 2.3.2 (2.3.2.125) - Jan...
Read more >
The Bugzilla Guide - 3.0.3 Release - MELCOR
This is the documentation for Bugzilla, a bug-tracking system from ... 2.3.2. Dependency Charts. As well as the text-based dependency trees ...
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