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

Precompile of AgentsGraphVisualizations fails #1098

Open
finmod opened this issue Oct 20, 2024 · 8 comments
Open

Precompile of AgentsGraphVisualizations fails #1098

finmod opened this issue Oct 20, 2024 · 8 comments
Labels
bug Something isn't working plotting

Comments

@finmod
Copy link

finmod commented Oct 20, 2024

| | || | | | (| | | Version 1.11.1 (2024-10-16)
/ |_'|||_'_| | Official https://julialang.org/ release
|__/ |

(@v1.11) pkg> up
Updating registry at C:\Users\Denis\.julia\registries\General.toml
No Changes to C:\Users\Denis\.julia\environments\v1.11\Project.toml
No Changes to C:\Users\Denis\.julia\environments\v1.11\Manifest.toml
Precompiling project...
✗ Agents → AgentsGraphVisualizations
0 dependencies successfully precompiled in 59 seconds. 678 already precompiled.
1 dependency errored.
For a report of the errors see julia> err. To retry use pkg> precompile

julia> err
PkgPrecompileError: The following 1 direct dependency failed to precompile:

AgentsGraphVisualizations

Failed to precompile AgentsGraphVisualizations [fc457f6c-ecc5-5e53-a4cf-8c57f0a5571f] to "C:\Users\Denis\.julia\compiled\v1.11\AgentsGraphVisualizations\jl_B1F8.tmp".
ERROR: LoadError: TypeError: in Type{...} expression, expected UnionAll, got a value of type Nothing
Stacktrace:
[1] top-level scope
@ C:\Users\Denis.julia\packages\Agents\dTr7O\ext\AgentsGraphVisualizations\AgentsGraphVisualizations.jl:6
[2] include
@ .\Base.jl:557 [inlined]
[3] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base .\loading.jl:2790
[4] top-level scope
@ stdin:5
in expression starting at C:\Users\Denis.julia\packages\Agents\dTr7O\ext\AgentsGraphVisualizations\AgentsGraphVisualizations.jl:2
in expression starting at stdin:

julia>

@Datseris Datseris added bug Something isn't working plotting labels Oct 20, 2024
@Datseris
Copy link
Member

which version of Julia and Agents.jl?

@finmod
Copy link
Author

finmod commented Oct 20, 2024

Julia v1.11.1 latest, Agents.jl v6.1.10

@Tortar
Copy link
Member

Tortar commented Oct 20, 2024

We observe the same in our CI: https://github.com/JuliaDynamics/Agents.jl/actions/runs/11394559895/job/31727914202?pr=1091, seems like a Julia bug because everything worked fine in previous versions

@rmellema
Copy link

I can confirm that it does still precompile just fine on Julia LTS, but it does mean that the package cannot even be installed on the newest version of Julia at the moment. Has anyone brought this to the attention of the Julia developers yet? If it is a bug on their side they should at least know about it.

@Datseris
Copy link
Member

I haven't found the root of the problem to report it anywhere yet. We Need to know what is failing to know where to report. It is probaby a problem with GraphMakie, not with Base Julia. Or, it could be our own problem. The error message points here:

const ABMP{S} = _ABMPlot{<:Tuple{<:ABMObservable{<:Observable{<:ABM{<:S}}}}}
. Which I find weird... I don't see something wrong there.

I am also confused why this fails the whole Agents compilation in the first place. AgentsGraphVisualizations is hidden behind an extension of GraphMakie and this isn't used yet. So this should be compiled only when GraphMakie is used...?

@rmellema
Copy link

rmellema commented Oct 24, 2024

You are right about it failing the whole agents compilation. I just created a clean environment in julia 1.11.1, and only installed Agents.jl and that went fine. Once I added GraphMakie the precompilation failed. So that bit is indeed all set up correctly and it only fails if you have both.

@Tortar
Copy link
Member

Tortar commented Oct 28, 2024

I think the general issue is discussed at JuliaLang/julia#56204, julia 1.11.1 introduced a breaking change which should be addressed from our side, I didn't have much time to understand really well how

@Datseris
Copy link
Member

It seems that it will be fixed in the next Julia patch release for 1.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plotting
Projects
None yet
Development

No branches or pull requests

4 participants