Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Deprecate named
inject
export from@ember/service
#1001Deprecate named
inject
export from@ember/service
#1001Changes from 3 commits
5cfd92e
f315ed3
b43bd86
b4302e5
5d91767
9624bb8
1630c79
a0b8c23
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 surprised that there are no listed drawbacks here. Indeed, you can easily change this in your app code, but if this is being imported by an addon that you don't control, there will be a cliff of ember versions that a non-updated addon can be supported on.
This is probably true generally, but it seems like a low-value artificial cliff to do this just for an export alias.
I ran a code search on emberobserver.com and it gives us lots of results for this usage:
714 addons (6562 usages)
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.
We need better filters on emberobserver 🤔 when I was doing all the research for #1003, I found that most usages were in addons that were no longer used, updated, or not compatible with a version of ember that would even see the deprecation. Not saying that this is the case (I see the same results, btw), but I just... can't know right now -- I should see what it would take to add some more filtering to code search on emberobserver.
aye, this is every deprecation, really.
as an alternative, we can auto-upgrade v1 addons via ember-cli-babel -- thoughts?
v2 addons, who don't use ember-cli-babel, are either already using plain service, or can quickly update
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 added a note here on drawbacks, and I think, in doing so, I've talked myself (or you helped me talk myself) into deferring this deprecation until Ember 6.1, targeting for removal in 7.
That gives addon authors a massive support range, should they choose to do so, of 3.28 to 6.12.x, with v7 dropping
inject
, making any folks with 3.28 support have to either drop it (supporting 4.1 as a minimum), or adding@embroider/macros
to keep support.This also gives the addon ecosystem a year and a half to decide how they want to support
inject
/service
throughout the entirety of the v6 series.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.
If we implement deprecation staging, we can enable the deprecation sooner even if it targets 7.0.
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.
a reasonable alternative would be to add a lint against it in the default lint set, essentially nudging people towards not needing it 👍
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.
yeah, that could happen now, actually, without an RFC