-
Notifications
You must be signed in to change notification settings - Fork 171
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
CLSContext now supports continuations with async-await #201
Conversation
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.
Thanks for beginning this
There are a number of similar issues and perhaps even pull requests. Can you please note them in this issue and ping people from those issues to review this?
|
||
async function newP(id) { | ||
const {cid1, cid2} = await ctx.letContext(id, () => afn()); | ||
// console.log(cid1, cid2); |
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.
remove the commented out stuff
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.
Ok.
} | ||
} | ||
}, | ||
"parser": "babel-eslint" |
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.
is this change necessary?
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, eslint was freaking out.
package.json
Outdated
@@ -33,4 +33,4 @@ | |||
"workspaces": [ | |||
"packages/*" | |||
] | |||
} | |||
} |
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.
might want to change your settings to ensure EOL before EOF
Going through #135 I was thinking what about creating a new folder What do you think? |
@Ghost---Shadow just to keep us from hopping issues too much. what's your idea on doing that? ex the why not the what. I know we've had some debates about how to keep the build running in various fashions and a lot of people have participated in these discussions. Would be nice to summarize work before this, what it solves from previous attempts, what it doesn't solve, how it addresses the build concerns, any compat impact with regards to react native or browser (like angular) apps. |
@adriancole I am afraid that I am not knowledgeable enough to have opinions on this subject matter. However, I urgently need this feature for a project so I created a new npm package called zipkin-context-cls-hooked.
|
@adriancole <https://github.com/adriancole> I am afraid that I am not
knowledgeable enough to have opinions on this subject matter.
heh you are more knowledgable than me! Main thing I'm hoping for help on is
actually getting a product folks can live with. We've had a number of times
where something similar is started, but not engaging other discussions and
so they end up somewhat mutually distracting. getting feedback > knowledge
in other words
… |
Would this fix #88 (comment) in terms of how express async middlewares are handled via CLSContext? |
Give it a try. |
Hi I'm coming to this issue because I met same problem, may I ask how is this issue now? it will get merged? Thanks! |
@eirslett @DanielMSchmidt considering this: https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a do we continue to support (watch out for conflicts with) react native? This topic has locked up a number of issues I'm afraid. |
@adriancole I would not say React Native is dying just because AirBnB decides to move away from it. That being said, we only have one version of zipkin.js that actually works in a none node environment, the current versions are broken anyway, so why care 🤷♂️ I haven't had the time and energy to put up meaningful E2E tests for either the browser or React Native (I think having one of the two would be a good start), sorry about that. |
Any chance to continue with this @Ghost---Shadow? |
@jcchavezs I dont even remember what this was :P I guess not. I have moved on. EDIT: I made a fork of this repo with this PR. You can find it here.
|
@Ghost---Shadow where does your fork's code live? The npm page has this project set as its home page and both Google search and Github search are failing me. zipkin-context-cls-hooked's npm readme even instructs using "zipkin-context-cls", so it feels rather hastily set up and unmaintained. There was conversation #135 (comment) to have it live in https://github.com/openzipkin-contrib but this has not been done. Just curious about the actual state of this. :) |
@r4j4h I just forked and fixed it for my personal use, I dont care what others are doing :) https://github.com/Ghost---Shadow/zipkin-js/tree/bugfix/asyc-await Anyway, I will resolve the merge conflicts |
As promised I have deprecated the package |
Might be too much to ask but would you check if someone is using it and
open PRs to that? Do you use it yourself?
…On Fri, 5 Jun 2020, 17:23 Souradeep Nanda, ***@***.***> wrote:
As promised I have deprecated the package
https://www.npmjs.com/package/zipkin-context-cls-hooked
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#201 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXOYAQ4ECPLDXKDM6SFXUDRVEEY3ANCNFSM4EYJIHFQ>
.
|
@jcchavezs I dont use it anymore. There are 200+ weekly downloads. People are using that. There are no PRs to my repository. They should be notified the next time they do an |
continuation-local-storage
has issues withasync-await
so someone made a library called cls-hooked which fixes that problem.This PR merely changes the dependency from
cls
tocls-hooked
.Also, added a test case to demonstrate the phenomenon.
Possible duplicate #135