data icon indicating copy to clipboard operation
data copied to clipboard

🛤️ tracking: universal support for all JS Applications

Open runspired opened this issue 2 years ago • 4 comments

Codename: 🔌 Project Unplug 🔌 Goal: Full decoupling from Ember's build, object model, scheduling, and reactivity model

Blocking

  • [x] Deprecate RSVP Chain Cutting
  • [x] Deprecate RSVP Timing (needs more implementation work)
  • [ ] deprecate Store extending EmberObject
  • [ ] provide default alternative to @ember-data/model
  • [ ] provide a build plugin for applications to do final compile with config
    • also necessary to become first-class embroider-optimized compatible
  • [x] eliminate backburner destroy/actions queue usage
  • [x] stop extending from Ember Service for the Store Service
  • [x] remove use of dependentKeyCompat in store package
  • [x] refactor @ember-data/tracking and audit @glimmer/tracking usage to a configuration point
    • this is mostly done and likely we could just put Starbeam there and call it a day.
  • [x] remove runloop destroy usage from record-data package
  • [x] remove isEqual usage from record-data package
  • [ ] provide a hook to configure @ember-data/tracking for glimmer/non-glimmer (or starbeam)
  • [ ] Configuration point for @ember/test-waiters for non-ember projects

Non Blocking

  • [ ] replace @ember/debug with something driven by our own config
  • [ ] replace @ember/string usage in builders with something lighter of our own
  • [ ] eliminate use of Ember Inflector in the core (almost done, currently approved RFC deprecations once implemented will result in removal). Make inflection in builders either configurable or use something lightweight of our own.
  • [ ] eliminate adapterFor/serializerFor resolver lookups
    • note this is already "done" for any app using RequestManager only
  • [ ] eliminate modelFor resolver lookups
    • note this already "done" for any app not using @ember-data/model

Updated Tests

  • [x] remove runloop usage in tests
  • [ ] remove A usage in tests
  • [ ] convert classic syntax usage in tests to native syntax
  • [x] remove RSVP usage in tests
  • [ ] remove EmberObject get/set etc. usage in tests

runspired avatar Aug 24 '22 21:08 runspired

What is RSVP timing?

fivetanley avatar Dec 07 '22 18:12 fivetanley

@fivetanley RSVP promises resolve in coordination with each other and the runloop in ways that native promises do not. They also do not interop with async/await in ways you might expect (the timing of the flush is different). Many of our tests rely on this and will need fixed, and user's apps may see unexpected errors where they were unknowingly benefiting from one outcome of a race condition being more common.

For the deprecation bit, I suspect we need a global flag that switches which promise we use from RSVP to native, deprecate the non-native flag-state, and let apps manage the migration, with native being the only thing used in 5.0.

runspired avatar Dec 07 '22 20:12 runspired

and let apps manage the migration, with native being the only thing used in 5.0.

@runspired I assume you mean "in 6.0" here, with the migration between promise libraries occurring during the course of the 5.x series?

acorncom avatar Dec 08 '22 07:12 acorncom

@acorncom depends on when the work is done. The list in this ticket is non-essential for 5.0 unless also mentioned in the embroider or 5.0 roadmaps. More than likely this will happen post-5.0 and of course we could implement now and not deprecate till 5.0

runspired avatar Dec 08 '22 07:12 runspired

closing in favor of the tracking in the mega-list for Polaris #9337

runspired avatar Apr 08 '24 07:04 runspired