clear out cache variables when loading the package#34
clear out cache variables when loading the package#34KristofferC wants to merge 1 commit intomasterfrom
Conversation
This is required on 1.10 where Downloads and NetworkOptions are in the sysimage (see JuliaLang/julia#53339) but it seems like a good idea here anyway in case someone adds a precompile workload to this package
eb5da6c to
2eb7348
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #34 +/- ##
==========================================
+ Coverage 95.52% 97.10% +1.57%
==========================================
Files 4 4
Lines 134 138 +4
==========================================
+ Hits 128 134 +6
+ Misses 6 4 -2 ☔ View full report in Codecov by Sentry. |
|
|
||
| const SYSTEM_CA_ROOTS_LOCK = ReentrantLock() | ||
| const SYSTEM_CA_ROOTS = Ref{String}() | ||
| const SYSTEM_CA_ROOTS = Ref{Union{String,Nothing}}(nothing) |
There was a problem hiding this comment.
| const SYSTEM_CA_ROOTS = Ref{Union{String,Nothing}}(nothing) | |
| const SYSTEM_CA_ROOTS = Ref{Union{String, Nothing}}(nothing) |
The pickiest of nits. Just because the other one has the space.
| for line in eachline(path) | ||
| if line == BEGIN_CERT_REGULAR | ||
| roots = path | ||
| openssl_only = false |
There was a problem hiding this comment.
Why does this change more of the logic than just SYSTEM_CA_ROOTS? Was there another issue to fix here?
There was a problem hiding this comment.
I'll change it back, I just wanted it to be more similar to how it was changed in BUNDLED_KNOWN_HOSTS_FILE
There was a problem hiding this comment.
That's fine, I just wasn't sure about the openssl_only part, which looks like a logic change to me.
This is required on 1.10 where Downloads and NetworkOptions are in the sysimage (see JuliaLang/julia#53339) but it seems like a good idea here anyway in case someone adds a precompile workload to this package.
I thought about using
atexithooks for this to avoid the__init__but that would require JuliaLang/julia#51849 (AFAIU) and we don't have that on 1.10.