Skip to content

remove using __init__ by either using OncePerProcess or recomputing #39

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

Merged
merged 4 commits into from
Jun 26, 2025

Conversation

KristofferC
Copy link
Member

__init__ is unfortunate in general because it requires unconditionally executing code on julia startup or package load and it also means the code cannot be pruned in e.g. trimming mode of julia. We can either use the new OncePerProcess to delay the execution until is needed or just skip the caching and recompute (the env_host_pattern_regex function is cheap enough that it shouldn't be an issue).

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.14%. Comparing base (8c93b06) to head (7a5bd22).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   99.23%   98.14%   -1.09%     
==========================================
  Files           4        3       -1     
  Lines         130      108      -22     
==========================================
- Hits          129      106      -23     
- Misses          1        2       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@StefanKarpinski
Copy link
Member

I'm on board with this. Not sure maintaining support for older versions makes much sense for NetworkOptions. If we wanted to, you could metaprogram around the Julia version.

@visr
Copy link
Contributor

visr commented Apr 3, 2025

Should be good to merge? And then BumpStdlibs to master and 1.12 so this and #37 are available for 1.12. Last time it ran was JuliaLang/julia#56949.

@Keno Keno merged commit 532992f into master Jun 26, 2025
6 of 7 checks passed
@Keno Keno deleted the kc/init branch June 26, 2025 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants