Skip to content
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

disable precompilation for selected packages via Preferences #334

Merged
merged 9 commits into from
Jan 9, 2023

Conversation

t-bltg
Copy link
Collaborator

@t-bltg t-bltg commented Jan 8, 2023

Fix #324.
Fix #298.
Supersedes #299.

@codecov
Copy link

codecov bot commented Jan 8, 2023

Codecov Report

Base: 83.56% // Head: 83.57% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (f688ea8) compared to base (333b645).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #334      +/-   ##
==========================================
+ Coverage   83.56%   83.57%   +0.01%     
==========================================
  Files          17       17              
  Lines        2184     2186       +2     
==========================================
+ Hits         1825     1827       +2     
  Misses        359      359              
Impacted Files Coverage Δ
SnoopPrecompile/src/SnoopPrecompile.jl 94.11% <100.00%> (+0.36%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@t-bltg
Copy link
Collaborator Author

t-bltg commented Jan 8, 2023

Hum, ERROR: LoadError: Preferences.jl can only be used on Julia v1.6+!.

=> restricted to julia 1.6+

@timholy
Copy link
Owner

timholy commented Jan 8, 2023

I wonder if we should make it more complicated 🙂 . Specifically, would it be useful to allow one to specify a list of packages one shouldn't execute the precompile workload for? If I'm developing a specific package I still might want good precompilation on others.

I'm happy to help with this. I was going to transfer SnoopPrecompile first but with this as a head-start there's probably no reason to do so.

@t-bltg
Copy link
Collaborator Author

t-bltg commented Jan 8, 2023

If I'm developing a specific package I still might want good precompilation on others.

Good point , yes.

Specifically, would it be useful to allow one to specify a list of packages one shouldn't execute the precompile workload for?

Done.

E.g. in ~/.julia/environments/v1.9/LocalPreferences.toml

[SnoopPrecompile]
skip_precompile = ["MarchingCubes"]

Do you have an idea for crafting a test for this ?

@t-bltg t-bltg changed the title disable precompilation via Preferences disable precompilation for selected packages via Preferences Jan 8, 2023
Copy link
Owner

@timholy timholy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tweaked the docs since precompilation itself isn't disabled, we're just skipping the workload that results in "extra" precompilation.

As far as a test, one could perhaps use

@precompile_all_calls begin
    global workload_ran = true
end

and check isdefined(SomeModule, :workload_ran) && SomeModule.workload_ran.

docs/src/snoop_pc.md Outdated Show resolved Hide resolved
docs/src/snoop_pc.md Outdated Show resolved Hide resolved
t-bltg and others added 2 commits January 8, 2023 13:33
Co-authored-by: Tim Holy <tim.holy@gmail.com>
Co-authored-by: Tim Holy <tim.holy@gmail.com>
@t-bltg t-bltg force-pushed the prefs branch 2 times, most recently from dbf848f to 2af9390 Compare January 8, 2023 13:16
@t-bltg
Copy link
Collaborator Author

t-bltg commented Jan 8, 2023

@timholy, can you cancel the previous Documenter workflows ? (Or maybe give me contribution rights to this repo ?)

They seem to hang and fill up the actions queue thus preventing running CI for most recent commits.
I've added a concurrency block in the .yml files.

Co-authored-by: Tim Holy <tim.holy@gmail.com>
@timholy timholy merged commit fa775b3 into timholy:master Jan 9, 2023
@timholy
Copy link
Owner

timholy commented Jan 9, 2023

Thanks so much!

Ideally I want to try a PkgEval run before we release this, but we should get this out soon: this meets a real need! ❤️

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.

disable precompilation on JULIA_PKG_PRECOMPILE_AUTO ? Option to turn off all precompilation globally
2 participants