DataFrames precompilation failure

Today I can’t get DataFrames.jl to pre-compile – even though I have had no issue previously. Any advice is welcome on how to fix the pre-compilation.

I tried to make a whole new project with only DataFrames, so there would be no issue with compatibility with other packages. Here are the errors from Pkg.precompile():


julia> Pkg.precompile()
Precompiling environment...
  ✗ SortingAlgorithms
  ✗ DataFrames
  0 dependencies successfully precompiled in 5 seconds. 27 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]

Failed to precompile DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0] to C:\Users\Andrea.Albright\.julia\compiled\v1.9\DataFrames\jl_3939.tmp.
ERROR: LoadError: UndefVarError: `@getkw` not defined
Stacktrace:
 [1] include
   @ .\Base.jl:450 [inlined]
 [2] 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, UInt64}}, source::String)
   @ Base .\loading.jl:1667
 [3] top-level scope
   @ stdin:1
in expression starting at C:\Users\Andrea.Albright\.julia\packages\SortingAlgorithms\3sO8j\src\SortingAlgorithms.jl:124
in expression starting at C:\Users\Andrea.Albright\.julia\packages\SortingAlgorithms\3sO8j\src\SortingAlgorithms.jl:3
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile SortingAlgorithms [a2af1166-a08f-5f64-846c-94a0d3cef48c] to C:\Users\Andrea.Albright\.julia\compiled\v1.9\SortingAlgorithms\jl_3A1E.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:1820
  [3] compilecache
    @ .\loading.jl:1764 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1431
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1295
  [6] macro expansion
    @ .\loading.jl:1275 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1238
  [9] include
    @ .\Base.jl:450 [inlined]
 [10] 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, UInt64}}, source::Nothing)
    @ Base .\loading.jl:1667
 [11] top-level scope
    @ stdin:1
in expression starting at C:\Users\Andrea.Albright\.julia\packages\DataFrames\58MUJ\src\DataFrames.jl:1  
in expression starting at stdin:1
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types C:\Users\Andrea.Albright\AppData\Local\Programs\Julia-1.9.0-alpha1\share\julia\stdlib\v1.9\Pkg\src\Types.jl:68
 [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{String}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API C:\Users\Andrea.Albright\AppData\Local\Programs\Julia-1.9.0-alpha1\share\julia\stdlib\v1.9\Pkg\src\API.jl:1436
 [3] precompile
   @ C:\Users\Andrea.Albright\AppData\Local\Programs\Julia-1.9.0-alpha1\share\julia\stdlib\v1.9\Pkg\src\API.jl:1073 [inlined]
 [4] #precompile#217
   @ C:\Users\Andrea.Albright\AppData\Local\Programs\Julia-1.9.0-alpha1\share\julia\stdlib\v1.9\Pkg\src\API.jl:1072 [inlined]
 [5] precompile
   @ C:\Users\Andrea.Albright\AppData\Local\Programs\Julia-1.9.0-alpha1\share\julia\stdlib\v1.9\Pkg\src\API.jl:1072 [inlined]
 [6] precompile()
   @ Pkg.API C:\Users\Andrea.Albright\AppData\Local\Programs\Julia-1.9.0-alpha1\share\julia\stdlib\v1.9\Pkg\src\API.jl:1072
 [7] top-level scope
   @ REPL[7]:1

Running Julia v1.9.0-alpha1 on a Windows 10 machine.

Never had a issue with DataFrames until today.

What version of DataFrames is being installed?

1 Like

The most recent one: DataFrames v1.6.1

Why not Julia v1.9.3?

1 Like

Upgrading to Julia 1.9.3 would fix the issue.

I recommend using juliaup.

1 Like

Looks like a bug in SortingAlgorithms.jl right?

The if statement is probably wrong in that the lower bound should be higher or non-inclusive. I am far more worried that the OP is using an alpha version that is known to be defective.

Thank all for the quick responses. Updating to Julia v1.9.3 fixed the issue.

1 Like