Skip to content
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 Location.create #16835

Closed
wants to merge 2 commits into from
Closed

Conversation

bekzod
Copy link
Contributor

@bekzod bekzod commented Jul 20, 2018

No description provided.

*/
export default {
/**
This is deprecated in favor of using the container to lookup the location
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this comments has been there since 2014, I think it is time now :P

Copy link
Member

Choose a reason for hiding this comment

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

AFAICT it was never actually deprecated, which means we can't remove it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thought since it is private and has @deprecated comment we could just drop it :P

Copy link
Member

Choose a reason for hiding this comment

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

Sure, but the deprecated comment doesn’t actually mean that it is deprecated. The fact that it’s private mostly just means that we can remove after the next LTS...


if (resolvedLocation !== undefined) {
location = set(this, 'location', resolvedLocation);
} else {
Copy link
Member

Choose a reason for hiding this comment

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

Need to bring back this branch with a deprecation

@@ -582,7 +582,6 @@ Ember.ComponentLookup = views.ComponentLookup;
Ember.EventDispatcher = views.EventDispatcher;

// ****ember-routing****
Ember.Location = routing.Location;
Copy link
Member

Choose a reason for hiding this comment

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

Needs a deprecation

@bekzod bekzod changed the title Remove deprecated Location.create Deprecate Location.create Jul 21, 2018
@bekzod bekzod force-pushed the cleanup-location branch 3 times, most recently from 4e795e9 to 0de8d29 Compare July 21, 2018 05:54
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

The until values for the deprecations here should be 3.9.0...

deprecate(
`\`Location.create\` is deprecated, use the \`container\` to register and lookup the location implementation that you need`,
false,
{ id: 'ember-routing.location-create', until: '3.5.0' }
Copy link
Member

Choose a reason for hiding this comment

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

Should be until 3.9.0 (master currently represents 3.5)

@bekzod
Copy link
Contributor Author

bekzod commented Jul 23, 2018

set to 3.9.0

return getHash(this.location);
if (DEBUG && HAS_NATIVE_PROXY) {
/* globals Proxy Reflect */
Location._implementations = new Proxy(
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, this strikes me as odd. Did we previously support Location._implementations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just put depreciation for Location.implementations = { location: MyLocation } case, when assigned in one go

@@ -53,7 +52,9 @@ export default EmberObject.extend({
@since 1.5.1
@method getHash
*/
getHash: EmberLocation._getHash,
getHash() {
Copy link
Member

Choose a reason for hiding this comment

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

Why not getHash, here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

utils/getHash expects location object, while this class getHash does not expect any arguments

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha, thank you!

@@ -288,7 +287,9 @@ export default EmberObject.extend({

@method getHash
*/
getHash: EmberLocation._getHash,
getHash() {
Copy link
Member

Choose a reason for hiding this comment

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

getHash, should work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

utils/getHash expects location object, while this class getHash does not expect any arguments

@bekzod
Copy link
Contributor Author

bekzod commented Aug 8, 2018

ping

@sandstrom
Copy link
Contributor

Just wanted to leave a comment and mention that this is also being worked on in this PR: #19510

@locks
Copy link
Contributor

locks commented Oct 13, 2021

Replaced by #19510

@locks locks closed this Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants