Force `precompile_workloads` to always be a compile-time preference
In order for a preference to be considered a compile-time preference (and therefore for it to invalidate a precompilation cache file) the preference must be read during compilation of a module. The precompile_workloads preference was not being read during PrecompileTools' compilation, but during compilation of modules using PrecompileTools (which is harmless, but does not mark the preference as compile-time for PrecompileTools, of course).
This adds a dummy read of the preference in order to mark it as compile-time, so that adding a precompile_workloads = false in your LocalPreferences.toml properly invalidates everything.
This closes #62
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.47%. Comparing base (
990c356) to head (5603ade).
Additional details and impacted files
@@ Coverage Diff @@
## main #63 +/- ##
=======================================
Coverage 82.47% 82.47%
=======================================
Files 3 3
Lines 97 97
=======================================
Hits 80 80
Misses 17 17
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
That did work in my testing, I figured that @KristofferC had a good reason for wanting to invalidate the world.
Ah, I had missed that it was specifically PrecompileTools' own setting that was at issue.
I agree that the point of that setting is the one in https://github.com/JuliaLang/PrecompileTools.jl/pull/63#pullrequestreview-2853053390. However, if we disable its own precompilation locally, and other packages are devved to use that version, then I guess technically we really should recompile the whole stack, no?