-
Notifications
You must be signed in to change notification settings - Fork 174
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
make Cohttp_lwt_unix.default_ctx lazy #1027
Conversation
There is still a failure
|
Are the rest of the failures expected? I am not sure how to debug the one that isn't marked experimental. |
I think this is good to go now! |
Hi @mseri, is this something that would be accepted? Or should we try to fix this problem internally? |
I don't see why not. I wanted to see if anybody had an opinion about it and if we could do it differently, but I don't think I will have time for doing that soon. I'll have a proper look in the weekend, sorry for the delay |
Hi @mseri, did you get a chance to look at this this last weekend? |
Looks good to me |
I am going to merge but please @mefyl have a look as well if you have time |
It looks like the problem and the solution here are the Unix backend equivalent of this issue in the jsoo backend, LGTM. |
The oss tool semgrep uses cohttp for some of its network requests. We recently got a bug report that showed that even if you didn't do any network requests if you don't have CA certificates installed on the machine you get the following backtrace.
This change makes the
default_ctx
value lazy so that it isn't initialized when the library is loaded. Which allows us to control when it is initialized. This is the same pattern that the conduit library uses for theredefault_ctx
.Test Plan
I have tested this change by: