-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make deprecation workflow built in #1009
Conversation
|
||
## How we teach this | ||
|
||
We'd want to add a new section in the guides under [`Application Concerns`](https://guides.emberjs.com/release/applications/) that talks about deprecations, how and how to work through those deprecations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How and how to?
Perhaps "when and how to"?
Co-authored-by: MrChocolatine <[email protected]>
Co-authored-by: MrChocolatine <[email protected]>
Co-authored-by: MrChocolatine <[email protected]>
Co-authored-by: MrChocolatine <[email protected]>
Co-authored-by: MrChocolatine <[email protected]>
Co-authored-by: MrChocolatine <[email protected]>
The Question:
It's possible we can do the first, and then the second, but the addon isn't very big (it's just one file, basically) |
This is something I'm surprised has t happened sooner. From what I've seen, you kinda had to be 'in the know' to use deprecation-workflow, and it wasn't clear that it was the recommended upgrade approach, at least for those who weren't around during its early days. +1 for baking it in. Or at least having an ember-cli command that installs it. |
RFC Review (1) are in favour of this. |
|
||
loadInitializers(App, config.modulePrefix); | ||
``` | ||
this conditional import is now easily customizable for folks in their apps, so they could opt to _not_ strip deprecation messages in production, and see where deprecated code is being hit by users (reported via Sentry, BugSnag, or some other reporting tool) -- which may be handy for folks who have a less-than-perfect test suite (tests being the only current way to automatically detect where deprecated code lives). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deprecate
calls from ember in production are stripped as part of Ember's build, not the project's, so there would be no way to keep them in production, right now
let matchKey = options && key === options.id ? 'matchId' : 'matchMessage'; | ||
|
||
self.deprecationWorkflow.deprecationLog.messages[key] = | ||
' { handler: "silence", ' + matchKey + ': ' + JSON.stringify(key) + ' }'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether in deprecation-workflow or in a new implementation, I think we should also capture options.url
and options.for
. The other options.since
I feel less strongly about but may be nice.
|
||
## Alternatives | ||
|
||
Have `ember-cli-deprecation-workflow` installed by default, (and) transferring `ember-cli-deprecation-workflow` to the emberjs org. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of this option. While it may not be much code, adding the addon is a quick path.
Co-authored-by: Katie Gengler <[email protected]>
We discussed this today and people were in favor of swapping the design around to the "just use the existing addon in the default blueprint" because it would be a quick win. We can still do the alternative of building it into ember later. |
I view Root causes:
It's arguable that (2) is now addressed, as both Ember 4.x and 5.x have not created a deprecation deluge. But it's hard to tell if this is intrinsic to the "major version release timeline" changes, or a coincidence from the shrinkage in Ember's maintainership structure the past few years. Were Polaris to solidify in the next 72 weeks, would Ember 6.x contain another large wave of deprecations, to facilitate Ember 7.x removing support for an older Edition? I don't see why not. One of Ember's strengths is its "batteries-included" nature, and I think that term should only apply when the functionality is provided by In addition, using Lastly it complicates the onboarding story. This package provides no immediate value to a new learner. When scanning the boilerplate they need to additionally learn to ignore All this is to say that adding |
@apellerano-pw 👋 I agree that it was a problem in the 3.x era where many projects silenced every deprecation for the three years of 3.x releases. Projects that chose to do so were left with many deprecations to deal with to reach 4.0. We hope we've addressed this with the new Major Version release cadence policy. Under this policy, a major lasts about 18 months. Deprecations targeting the next major must land within the first 60 weeks of major version (before the x.10). By having less time for deprecations to land, there should be fewer for a particular major version. Contributors are also well aware of the pain of 1.13 and 3.28 and we keep that in mind when accepting and implementing deprecation RFCs. All deprecations need to be RFC'd. Deprecation RFCs go through all the RFC stages. It isn't a small effort to land a deprecation Ember. For example, In the lead up to 5.10, we hoped to land the deprecation of
The messages that go with Ember deprecations strive to have enough detail that they are actionable. They also link out to a deprecation guide. The stack enables the user to find the origin of the deprecation. It may be annoying to need to update the deprecation workflow upon upgrade, but I don't see an alternative. We cannot hide deprecations on upgrade -- that would have the same problems as silencing them and ignoring them. We cannot avoid adding all deprecations if we want to move this framework forward. Adding the addon to the blueprint was deemed to be less work for maintainers than building it in directly while also achieving the goal of making the addon more widely known and building it into the guides. |
I think the most pressing question still unanswered is what is the upside of including Given that there are downsides to including it:
Another approach could be to improve the existing documentation, in terms of quality or discoverability. Although I think the documentation is good already, and only a couple of clicks away from the Ember guide homepage. If the cost to internalize a deprecation workflow is too high, I think the next strongest option is to do nothing. |
I mean, I'm happy to "just" implement all of this in ember-source. There may be some goofiness that might need to happen with build time behavior with complicates things -- but it's probably better to work through it.
there is overwhelming evidence that the average person doesn't read or glosses over messages in the console. the deprecation-workflow (regardless of where it lives), provides a way for folks-who-pay-attention to minimize console spew for those who easily gloss over the messages. |
Regarding the question "what is the upside of including ember-cli-deprecation-workflow in the blueprint?" Cons stated above
Of these two, the maintenance burden comment isn't that great and as a community I think we've been content with it so far (happy to have someone correct me on that). But a few thoughts on the pros side of things (coming from a teaching background / former Learning Team member perspective):
The latter pro is one I find an interesting counter-argument to the "let's just bake this into the framework". Under the hood, If we bake the functionality in all the way to the framework, I think we make that single method quite a bit harder to find. Does it still exist in Ember source? You bet. Is it still documented in the api docs? Of course. But most folks I've mentored / taught Ember over the last 10 years might feel comfortable poking around an add-on that does approximately what they want, but often haven't ever dived into reading To me, Ember's addon ecosystem (past and future) provides a useful set of real-world examples of the breadth of high-to-low-level apis that actually do exist under the hood that allow a myriad of interesting capabilities. Whether we choose to bake this particular one into the framework is less material to me, but I think we'd be ill-served to bake a bunch of our core-addons into the framework. Having our lower-level plumbing apis exposed and tested by these addons still seems quite useful. |
Propose making deprecation-workflow built in.
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
S-Proposed
is removed from the PR and the labelS-Exploring
is added.Checklist to move to Accepted
Final Comment Period
label has been added to start the FCP