Conversation
|
Would this somehow make it any easier to solve the following issue without a hack? |
|
Probably not. My intention here is to allow us to back out of |
lib/current-context.js
Outdated
| // ClsContext.getCurrentContext() to loopback.getCurrentContext() | ||
| deprecated('loopback.getCurrentContext() is deprecated. ' + | ||
| 'Consider using different means of passing the context around. ' + | ||
| 'As a short-term fix, use loopback-context-cls module.'); |
There was a problem hiding this comment.
This message is a bit confusing. Maybe we should say something like:
The current implementation is based on loopback-context-cls and it has some limitations.
There was a problem hiding this comment.
I am fine to improve the message, as long as it remains actionable. I.e. it should be clear to the user how to get rid of that deprecation warning.
IMO, your proposal @raymondfeng, describes the state but does not provide any clue to the user about how to proceed.
Which part of the message do you find confusing?
There was a problem hiding this comment.
Can we link to a github issue or wiki (or other doc) so that we can keep the info up to date?
A deprecation warning will be sufficient to direct the person to a doc with some concrete info. We can also keep this up to date as we look into this further.
There was a problem hiding this comment.
The confusing part of As a short-term fix, use loopback-context-cls module. is that it seems to instruct a user to use loopback-context-cls, which is already being used.
There was a problem hiding this comment.
I have reworded deprecation warnings to point to our documentation page: https://docs.strongloop.com/display/APIC/Using%20current%20context
5c89b50 to
ba55e26
Compare
|
@raymondfeng @ritch PTAL again, LGTY now? |
|
LGTM |
|
I am waiting for https://github.com/strongloop/loopback-context/pull/3/files before landing this PR. |
Deprecate all current-context APIs in favour of loopback-context-cls.
ba55e26 to
ca28e7f
Compare
Deprecate all current-context APIs in favour of loopback-context-cls.
This is a follow-up for strongloop/loopback-context#1
@raymondfeng @ritch please review
cc @strongloop/loopback-dev FYI