Skip to content

Conversation

wagenet
Copy link
Member

@wagenet wagenet commented Aug 12, 2025

Deprecate Computed

Rendered

Summary

This pull request is proposing a new RFC.

To succeed, it will need to pass into the Exploring Stage, followed by the Accepted Stage.

A Proposed or Exploring RFC may also move to the Closed Stage if it is withdrawn by the author or if it is rejected by the Ember team. This requires an "FCP to Close" period.

An FCP is required before merging this PR to advance to Accepted.

Upon merging this PR, automation will open a draft PR for this RFC to move to the Ready for Released Stage.

Exploring Stage Description

This stage is entered when the Ember team believes the concept described in the RFC should be pursued, but the RFC may still need some more work, discussion, answers to open questions, and/or a champion before it can move to the next stage.

An RFC is moved into Exploring with consensus of the relevant teams. The relevant team expects to spend time helping to refine the proposal. The RFC remains a PR and will have an Exploring label applied.

An Exploring RFC that is successfully completed can move to Accepted with an FCP is required as in the existing process. It may also be moved to Closed with an FCP.

Accepted Stage Description

To move into the "accepted stage" the RFC must have complete prose and have successfully passed through an "FCP to Accept" period in which the community has weighed in and consensus has been achieved on the direction. The relevant teams believe that the proposal is well-specified and ready for implementation. The RFC has a champion within one of the relevant teams.

If there are unanswered questions, we have outlined them and expect that they will be answered before Ready for Release.

When the RFC is accepted, the PR will be merged, and automation will open a new PR to move the RFC to the Ready for Release stage. That PR should be used to track implementation progress and gain consensus to move to the next stage.

Checklist to move to Exploring

  • The team believes the concepts described in the RFC should be pursued.
  • The label S-Proposed is removed from the PR and the label S-Exploring is added.
  • The Ember team is willing to work on the proposal to get it to Accepted

Checklist to move to Accepted

  • This PR has had the Final Comment Period label has been added to start the FCP
  • The RFC is announced in #news-and-announcements in the Ember Discord.
  • The RFC has complete prose, is well-specified and ready for implementation.
    • All sections of the RFC are filled out.
    • Any unanswered questions are outlined and expected to be answered before Ready for Release.
    • "How we teach this?" is sufficiently filled out.
  • The RFC has a champion within one of the relevant teams.
  • The RFC has consensus after the FCP period.

@github-actions github-actions bot added the S-Proposed In the Proposed Stage label Aug 12, 2025
@wagenet wagenet force-pushed the deprecate-computed branch from b51b414 to bfadfdd Compare August 12, 2025 17:22
@wagenet
Copy link
Member Author

wagenet commented Aug 12, 2025

Deprecation Guides: ember-learn/deprecation-app#1412


### Macro-by-Macro Replacement Patterns

Below each macro lists: Purpose, Before, After (tracked + JS), and Codemod Strategy.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI There is already a codemod available. I built one a while ago to completely migrate a codebase off macros: https://github.com/OTA-Insight/ember-computed-macro-codemod/

It does not cover all macro's though, so there's room to extend it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well that's a great start!

@ef4 ef4 added S-Exploring In the Exploring RFC Stage and removed S-Proposed In the Proposed Stage labels Aug 15, 2025
@NullVoxPopuli NullVoxPopuli mentioned this pull request Aug 22, 2025
11 tasks
@apellerano-pw
Copy link

Is there a way to provide computed properties as an addon, for continued compatibility?

There is only a subset of computed property usage that is easy to automate away - when the dependent key exists in the same context as the computed property. But computed properties can be dependent on state anywhere in the system, such as Services or other singleton or global patterns. The set call mutations happen 'at a distance' and make a rewrite hard or impossible to automate.

My main concern is that this deprecation will produce an amount of manual effort so great, it will rival the Ember 3->4 migration and create another pit to further fracture the userbase.

Ember is particularly incoherent right now, and the level of incoherence at the time of Ember 6.12 could become crystalized if the 6->7 migration pathway is too labor intensive.

I don't know much about the inner workings of the computed property system. Could the 'brains' be moved into a Service, and classes that uses computed properties decorated? I think the decorator would have to splash onto anything that needs the set function, and could be a good halfway step on the way to tracked properties.

I don't think there would be a need for a get call? IIRC there's only a narrow use case that still requires them, which should be eliminated by RFC 1112 (deprecate Ember Proxies)

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Aug 28, 2025

it may be possible to provide a babel plugin that:

  • uses a new version of computed built on top of tracked (behavior may still be subtly different, not sure yet)
  • essentially undeprecating things for your app and all your addons

Your tech debt then becomes a list of babel plugins, which are easy to burn down over time (fewer babel plugins = better build perf? idk)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Exploring In the Exploring RFC Stage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants