Skip to content

AlgorithmsFromTheBook: error precompiling with Julia Version 1.8.5 #1

@DanielEWeeks

Description

@DanielEWeeks

Pkg.clone is now apparently obsolete:

julia> Pkg.clone("https://github.com/KennethLange/AlgorithmsFromTheBook.jl.git")
ERROR: UndefVarError: clone not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base ./Base.jl:31
 [2] top-level scope
   @ REPL[8]:1

But it looks like Pkg.add works:

Pkg.add(url="https://github.com/KennethLange/AlgorithmsFromTheBook.jl.git")

But then I encounter this error when trying to use the package with Julia Version 1.8.5:

julia> using AlgorithmsFromTheBook
[ Info: Precompiling AlgorithmsFromTheBook [628264c5-7e14-5233-be68-46f57bdd73bf]
ERROR: LoadError: syntax: invalid named tuple element "sum(S, dims = 2)" around /Users/dweeks/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/ANOVA.jl:7
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/ANOVA.jl:3
 [2] include(mod::Module, _path::String)
   @ Base ./Base.jl:419
 [3] include(x::String)
   @ AlgorithmsFromTheBook ~/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/AlgorithmsFromTheBook.jl:3
 [4] top-level scope
   @ ~/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/AlgorithmsFromTheBook.jl:6
 [5] include
   @ ./Base.jl:419 [inlined]
 [6] 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:1554
 [7] top-level scope
   @ stdin:1
in expression starting at /Users/dweeks/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/ANOVA.jl:3
in expression starting at /Users/dweeks/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/AlgorithmsFromTheBook.jl:3
in expression starting at stdin:1
ERROR: Failed to precompile AlgorithmsFromTheBook [628264c5-7e14-5233-be68-46f57bdd73bf] to /Users/dweeks/.julia/compiled/v1.8/AlgorithmsFromTheBook/jl_DlIJuq.
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:1707
 [3] compilecache
   @ ./loading.jl:1651 [inlined]
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1337
 [5] _require_prelocked(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1200
 [6] macro expansion
   @ ./loading.jl:1180 [inlined]
 [7] macro expansion
   @ ./lock.jl:223 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1144
julia> Pkg.precompile()
Precompiling project...
  ✗ AlgorithmsFromTheBook
  0 dependencies successfully precompiled in 3 seconds. 148 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

AlgorithmsFromTheBook [628264c5-7e14-5233-be68-46f57bdd73bf]

Failed to precompile AlgorithmsFromTheBook [628264c5-7e14-5233-be68-46f57bdd73bf] to /Users/dweeks/.julia/compiled/v1.8/AlgorithmsFromTheBook/jl_KCG9te.
ERROR: LoadError: syntax: invalid named tuple element "sum(S, dims = 2)" around /Users/dweeks/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/ANOVA.jl:7
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/ANOVA.jl:3
 [2] include(mod::Module, _path::String)
   @ Base ./Base.jl:419
 [3] include(x::String)
   @ AlgorithmsFromTheBook ~/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/AlgorithmsFromTheBook.jl:3
 [4] top-level scope
   @ ~/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/AlgorithmsFromTheBook.jl:6
 [5] include
   @ ./Base.jl:419 [inlined]
 [6] 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:1554
 [7] top-level scope
   @ stdin:1
in expression starting at /Users/dweeks/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/ANOVA.jl:3
in expression starting at /Users/dweeks/.julia/packages/AlgorithmsFromTheBook/QeqyW/src/AlgorithmsFromTheBook.jl:3
in expression starting at stdin:1
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
 [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 /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1435
 [3] precompile
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1072 [inlined]
 [4] #precompile#225
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1071 [inlined]
 [5] precompile (repeats 2 times)
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1071 [inlined]
 [6] top-level scope
   @ REPL[22]:1
julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions