Skip to content

Conversation

@wagenet
Copy link
Member

@wagenet wagenet commented Jun 20, 2025

Propose Deprecating Mixin Support

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.

@kategengler
Copy link
Member

This needs a deprecation guide.

@kategengler kategengler added S-Exploring In the Exploring RFC Stage and removed S-Proposed In the Proposed Stage labels Jun 20, 2025
@ef4
Copy link
Contributor

ef4 commented Jun 27, 2025

This seems good to me, it might benefit from some cross-linking with the classic class syntax deprecation, since you can't even apply Mixins anyway post that change.

@wagenet
Copy link
Member Author

wagenet commented Aug 12, 2025

@ef4 yes, this one is logically prior to the Classic Classes deprecation.

@ef4 ef4 mentioned this pull request Aug 15, 2025
11 tasks
## Transition Path

All existing public Ember mixins will be deprected:

Copy link
Member

Choose a reason for hiding this comment

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

These links are wrong


## Transition Path

All existing public Ember mixins will be deprected:
Copy link
Member

Choose a reason for hiding this comment

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

May be preferable to list the import paths that are deprecated

- [Ember.Observable](https://github.com/wagenet/rfcs/pulls/1115)

For users that still want mixin-like functionality, we should recommend class
decorators. If this feels less ergonimic that we would desire, we can consider
Copy link
Member

Choose a reason for hiding this comment

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

Maybe cross-link to the deprecation guide?

@apellerano-pw
Copy link

apellerano-pw commented Aug 22, 2025

What is the migration path? I'm a little worried about the guidance to convert them to decorators, since those are only in the proposal stage.

So far Ember has insulated framework users from the decorators proposal. The only decorators an Ember App has to adopt, is the ones in Ember's public API. If the decorators proposal were to be rejected, and the transpilations abandoned, Ember would then provide an interoperability layer or migration path for @tracked, @service, etc.

It would be a departure for Ember to recommend individual apps adopt the decorator proposal, without any further promise of a migration path. Under normal circumstances I would keep my projects away from the decorator proposal because it's such a contagious pattern and (if rejected) the buy-out cost is immense. It's only through Ember's great maintainability & migration guarantees that it makes sense to try them out early while still in the proposal phase.

Is there a thin migration tool Ember can provide for Mixins that may, under the hood, lean further on decorators, but continue insulating the framework users from adopting a proposal?

@kategengler
Copy link
Member

@apellerano-pw I commented on the deprecation guide earlier today with my approach to replacing mixins, that does not involve decorators https://github.com/ember-learn/deprecation-app/pull/1408/files#r2294386792

@apellerano-pw
Copy link

Thanks @kategengler I think that pattern will work for my projects' Mixins.

@ef4
Copy link
Contributor

ef4 commented Aug 29, 2025

From RFC review discussion:

  • we should recommend ordering relative to other deprecations. Specifically, using the native class codemod to clear the native class deprecation before attempting to refactor away Mixins is probably the easiest path. (Even though the actual removal in Ember would have a dependency in the opposite order -- we can't remove old-style classes without also removing mixins.)

@ef4 ef4 merged commit 85d866e into emberjs:main Sep 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Final Comment Period S-Exploring In the Exploring RFC Stage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants