Skip to content

Precompile cache misses #594

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

Closed
ZenanH opened this issue Feb 23, 2025 · 4 comments · Fixed by JuliaPy/CondaPkg.jl#171
Closed

Precompile cache misses #594

ZenanH opened this issue Feb 23, 2025 · 4 comments · Fixed by JuliaPy/CondaPkg.jl#171

Comments

@ZenanH
Copy link

ZenanH commented Feb 23, 2025

Hi, I'm using PythonCall.jl in my Julia package, but I found that it always precompiles this package.

[ Info: Precompiling Newenv [10636705-ebed-4bed-86c5-f04e3a3b5270] (cache misses: dep uuid changed (2))

Is this an expected behavior or is there something wrong with my usage? Below is my code.


/Newenv.jl                
.
├── CondaPkg.toml
├── Project.toml
└── src
    └── Newenv.jl

1 directory, 3 files
  • CondaPkg.toml
channels = ["conda-forge"]

[deps]
meshio = ""
  • Project.toml
name = "Newenv"
uuid = "10636705-ebed-4bed-86c5-f04e3a3b5270"
authors = ["test [email protected]"]
version = "0.1.0"

[deps]
CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab"
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"

[compat]
CondaPkg = "0.2"
PythonCall = "0.9"
julia = "1.11"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
  • Newenv.jl
module Newenv

using PythonCall

const meshio = Ref{Py}()

function __init__()
    meshio[] = pyimport("meshio")
    println("Newenv initialized")
end

greet() = print("Hello World!")

end # module Newenv

I cd to path/to/Newenv.jl and launch Julia, than type dev . to install this package.

precompile every time:

╭─zhuo@rtx3090 ~ 
╰─$ ju
julia> using Newenv
Precompiling Newenv...
  1 dependency successfully precompiled in 2 seconds. 50 already precompiled.
[ Info: Precompiling Newenv [10636705-ebed-4bed-86c5-f04e3a3b5270] (cache misses: dep uuid changed (2))
Newenv initialized

julia> exit()
╭─zhuo@rtx3090 ~ 
╰─$ ju
julia> using Newenv
Precompiling Newenv...
  1 dependency successfully precompiled in 2 seconds. 50 already precompiled.
[ Info: Precompiling Newenv [10636705-ebed-4bed-86c5-f04e3a3b5270] (cache misses: dep uuid changed (2))
Newenv initialized

julia> exit()
@cjdoris
Copy link
Collaborator

cjdoris commented Feb 24, 2025

What makes you think this is caused by PythonCall?

@ZenanH
Copy link
Author

ZenanH commented Feb 24, 2025

oh, sorry it is my just a guess, since only PythonCall is used in the module file?

@Beforerr
Copy link

I could reproduce it with only using PythonCall in Julia version 1.11.3 when using this module in deps of other module. (This does not happen in the Newenv itself).

But this might be a Julia precompileing issue, I am not sure.

module Newenv
using PythonCall
end

@mkschleg
Copy link

mkschleg commented Mar 1, 2025

I am also seeing this happen when all the package code does is load PythonCall.

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 a pull request may close this issue.

4 participants