Add tracked properties behind a feature flag #16366
This PR includes "auto-tracking" of tracked getters, added to Glimmer in glimmerjs/glimmer.js#115.
For context, here is the description of the PR when added to Glimmer:
This PR also integrates tracked properties with Ember's object model.
Concretely, this means:
In practice, this means that it is possible to migrate an Ember-style object to an idiomatic Glimmer-style object, and computed properties that consume the Glimmer-style object will work without adding new dependent keys.
There are still an open question about how to usefully tell developers when they have forgotten to mark properties as tracked (
There is some evidence that it's possible to explain the programming model where forgetting to do something explicit means values won't update (silently) from other communities, but:
One thing we've considered is using the existing development-mode proxy we create for Ember-style objects to detect patterns where a property on an Ember object was consumed inside of a computed property or tracked getter and later set, so we could tell the user where they have forgotten to add the tracked annotation. This is a speculative idea that may not pan out, and resolving this open question is important before stabilizing this feature.