-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 auto location #19510
Deprecate auto location #19510
Conversation
@sandstrom I think you can use the |
This looks good overall. I think once we have some tests, we should be good to go. |
b660c09
to
7205240
Compare
@rwjblue I've gotten the tests running.
I haven't added any tests checking for the actual deprecation messages though, don't know if that's required. Hopefully we can get this in before the 4.0 release.
|
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.
@sandstrom I'm sorry we didn't manage to get this landed before 4.0. It seems like it was pretty close, and then summer hours hit and this fell off our radar. I really appreciate the effort you put in.
Can you tweak this and the deprecation guide PR to target 5.0?
This functionality has been deprecated since 2014, but there wasn't any deprecation message before. See commit #1d1d0db4 for details.
We're only showing the deprecation warning for locations other than 'auto', since auto already have it's own deprecation message. We're also moving the rootURL trailing slash check from detect to initState. That assert has nothing to do with detection, but it was likely added there because that method is called *after* the rootURL value is set on the location (by the router). Luckily, the initState method is also called after that value is set, so we can use that hook instead. We're hijacking a method for something that isn't it's primary purpose, but that was the case with the existing code too, so this seems like a reasonable solution.
7205240
to
f74ef2a
Compare
@mixonic I've updated the PR to target 5.0.0. I set the since/enabled value to 4.1.0, since I think 4.0.0 may be released soon, and possibly before anyone has had time to merge this. But let me know if you want to drop this down to 4.0.0 for the since/enabled value. |
friendly ping @mixonic 😄 |
Code to implement the Deprecate Auto Location RFC.
Open Questions
TODO
Related PRs
@rwjblue I know you have a bunch of stuff on your plate, but if you have time, feel free to have a look at this.