JuliaLang / PrecompileTools.jl

Reduce time-to-first-execution of Julia code
MIT License
209 stars 13 forks source link

Disabling precompilation does not seem to work #22

Closed jkrumbiegel closed 1 year ago

jkrumbiegel commented 1 year ago

I have a shared environment @makie in which the dev versions of the related packages live. My preferences file is:

shell> cat ~/.julia/environments/makie/LocalPreferences.toml
[SnoopPrecompile]
skip_precompile = ["GLMakie", "CairoMakie", "Makie", "MakieCore"]

The precompile workload that just got executed (I know because it threw an error due to a change I made earlier) is

using PrecompileTools

macro compile(block)
    return quote
        figlike = $(esc(block))
        Makie.colorbuffer(figlike)
    end
end

let
    @compile_workload begin
        CairoMakie.activate!()
        base_path = normpath(joinpath(dirname(pathof(Makie)), "..", "precompile"))
        shared_precompile = joinpath(base_path, "shared-precompile.jl")
        include(shared_precompile)
    end
end

Do you see anything here that should prohibit the correct reading of these preferences? I probably did something wrong but I'm not sure what it could be. Do shared envs not work with the preferences approach?

KristofferC commented 1 year ago

I think you are using the old way of disabling precompilation. I think it is now a package specific preference, see https://julialang.github.io/PrecompileTools.jl/stable/#Package-developers:-reducing-the-cost-of-precompilation-during-development.

jkrumbiegel commented 1 year ago

Oh ok this is embarassing, you're correct of course. I switched laptops and thought I had done this already on this machine, but it was the other one, so I started with the wrong assumptions. Thanks for the quick response.