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

Failing to compile on 1.12 nightly #396

Open
andrew-saydjari opened this issue Apr 29, 2024 · 7 comments
Open

Failing to compile on 1.12 nightly #396

andrew-saydjari opened this issue Apr 29, 2024 · 7 comments

Comments

@andrew-saydjari
Copy link

I have been finding that some of my unit tests have been consistently failing on the 1.12 nightlys for several months, I think due to BlockArrays.jl. I am not sure if this is a known issue? I am having trouble parsing the error to understand if there is something I should be modifying on my side in the package that depends on BlockArrays via BasisFunctions. The unit test run is here, with the relevant error posted below.

ERROR: LoadError: The following 1 direct dependency failed to precompile:

BasisFunctions --code-coverage=@/home/runner/work/apMADGICS.jl/apMADGICS.jl --color=yes --check-bounds=yes --warn-overwrite=yes --depwarn=yes --inline=yes --startup-file=no --track-allocation=none --check-bounds=yes 

Failed to precompile BasisFunctions [4343a256-5453-507d-8aad-01a9d7189916] to "/home/runner/.julia/compiled/v1.12/BasisFunctions/jl_ds9hNZ".
ERROR: LoadError: too many parameters for type AbstractTriangular
Stacktrace:
  [1] top-level scope
    @ none:1
  [2] eval(m::Module, e::Any)
    @ Core ./boot.jl:432
  [3] top-level scope
    @ ~/.julia/packages/BlockArrays/TOpxG/src/abstractblockarray.jl:187
  [4] include(mod::Module, _path::String)
    @ Base ./Base.jl:559
  [5] include(x::String)
    @ BlockArrays ~/.julia/packages/BlockArrays/TOpxG/src/BlockArrays.jl:1
  [6] top-level scope
    @ ~/.julia/packages/BlockArrays/TOpxG/src/BlockArrays.jl:49
  [7] include
    @ ./Base.jl:559 [inlined]
  [8] 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::String)
    @ Base ./loading.jl:2769
  [9] top-level scope
    @ stdin:4
 [10] eval
    @ ./boot.jl:432 [inlined]
 [11] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2591
 [12] include_string
    @ ./loading.jl:2601 [inlined]
 [13] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:323
 [14] _start()
    @ Base ./client.jl:[533](https://github.com/andrew-saydjari/apMADGICS.jl/actions/runs/8871723814/job/24355094867#step:6:536)
in expression starting at /home/runner/.julia/packages/BlockArrays/TOpxG/src/abstractblockarray.jl:186
in expression starting at /home/runner/.julia/packages/BlockArrays/TOpxG/src/BlockArrays.jl:1
in expression starting at stdin:4
ERROR: LoadError: Failed to precompile BlockArrays [8e7c35d0-a365-5155-bbbb-fb81a777f24e] to "/home/runner/.julia/compiled/v1.12/BlockArrays/jl_6B0CRf".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:44
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64})
    @ Base ./loading.jl:3034
  [3] (::Base.var"#1104#1105"{Base.PkgId})()
    @ Base ./loading.jl:2437
  [4] mkpidlock(f::Base.var"#1104#1105"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:93
  [5] #mkpidlock#6
    @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:88 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:114
  [7] #invokelatest#2
    @ ./essentials.jl:1034 [inlined]
  [8] invokelatest
    @ ./essentials.jl:1029 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1104#1105"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3604
 [10] maybe_cachefile_lock
    @ ./loading.jl:3601 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2433
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2266
 [13] #invoke_in_world#3
    @ ./essentials.jl:1066 [inlined]
 [14] invoke_in_world
    @ ./essentials.jl:1063 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2257
 [16] macro expansion
    @ ./loading.jl:2197 [inlined]
 [17] macro expansion
    @ ./lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2154
 [19] #invoke_in_world#3
    @ ./essentials.jl:1066 [inlined]
 [20] invoke_in_world
    @ ./essentials.jl:1063 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2147
 [22] include
    @ ./Base.jl:[559](https://github.com/andrew-saydjari/apMADGICS.jl/actions/runs/8871723814/job/24355094867#step:6:562) [inlined]
 [23] 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:2769
 [24] top-level scope
    @ stdin:4
 [25] eval
    @ ./boot.jl:432 [inlined]
 [26] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2591
 [27] include_string
    @ ./loading.jl:2601 [inlined]
 [28] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:323
 [29] _start()
    @ Base ./client.jl:533
in expression starting at /home/runner/.julia/packages/BasisFunctions/vajKb/src/BasisFunctions.jl:1
in expression starting at stdin:
in expression starting at /home/runner/work/_actions/julia-actions/julia-runtest/v1/test_harness.jl:7
@jishnub
Copy link
Member

jishnub commented Apr 29, 2024

Which version of BlockArrays are you using? I think this should be fixed on recent versions

@andrew-saydjari
Copy link
Author

I am not imposing any constraints directly. BasisFunctions is imposing [compat] 0.16, which is getting solved to

[8e7c35d0] BlockArrays v0.16.25

with the nightly version of Julia in the unit tests. I see we are on v0.16.43 now, so maybe that is the problem? Is it maybe an issue that the Pkg manager is not imposing a tighter constraint on the BlockArrays version conditional on the Julia version?

@jishnub
Copy link
Member

jishnub commented Apr 29, 2024

That's quite likely. I think this was resolved on v1.16.36. I wonder why the resolver chooses such an old version of BlockArrays. Perhaps you could add a weak dependency on BlockArrays in your Project.toml so that you may set an explicit compat bound?

@andrew-saydjari
Copy link
Author

andrew-saydjari commented Apr 29, 2024

It seems like the problem would be solved more globally if BlockArrays had tighter upper bounds on its Julia compat, so that the Pkg manager would be able to automatically choose the correct version? Not sure if there is a procedure for editing the [compat] julia entry for older versions (everything prior to v0.16.36)?

@andrew-saydjari
Copy link
Author

The lack of automatic resolution seems to really be coming from the limited compat (0.12-0.13) with FillArrays in BasisFunctions which then conflicts with the modern compat of 1 for FillArrays in the newer BlockArrays Project.toml. This prevents even the weakdeps solution you suggested from working, but I opened an issue to see if the tight upper compat in BasisFunctions on FillArrays could be lifted.

@jishnub
Copy link
Member

jishnub commented Apr 29, 2024

Yeah that might be a good idea. The registry can be modified to ensure that broken versions aren't fetched.

@andrew-saydjari
Copy link
Author

Ok, the update pushed this afternoon relaxing the compat on FIllArrays in BasisFunctions fixed all of my personal problems, so happy to have this closed. Also happy to have it left open as a reminder to impose a slightly tighter compat on the julia version in older releases to prevent fetching broken versions as you mentioned. Thanks!

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

No branches or pull requests

2 participants