Ensure compilation happens after logging starts#53
Conversation
If compilation of the workload happens before the logging system is initialized, many CodeInstances may be missed. This exploits `Core.@invokelatest` to prevent inference from proceeding into the workload. It removes the `@force_compile`, which introduces some risk that even the workload will be interpreted. Also wraps the `@setup_workload` block with a `let`. Fixes #17 Fixes #26 Fixes #37
|
Weird. Those tests pass locally for me. I'm guessing it's a coverage thing. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
=======================================
Coverage 81.81% 81.81%
=======================================
Files 3 3
Lines 77 77
=======================================
Hits 63 63
Misses 14 14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Is there something that can be backported to a pre-1.12+ julia PrecompileTools version so that the compile fixes are also available there? |
|
No, |
|
Or maybe |
|
Yes I meant |
|
I could add a branch for pre-Julia 1.12 to make it easier to continue to support older releases. Since this repo is JuliaLang, any preferred naming convention? If not I may use |
|
Before v1.12, you could conditionally define something like |
If compilation of the workload happens before the logging system is
initialized, many CodeInstances may be missed. This exploits
Core.@latestworldto prevent inference from proceeding into theworkload. It removes the
@force_compile, which introducessome risk that even the workload will be interpreted.
Also wraps the
@setup_workloadblock with alet.Fixes #17
Fixes #26
Fixes #37
Closes #40
Closes JuliaLang/julia#57957
CC @vtjnash