Boot.jl – An attempt at loading folders

Wrote a package after thinking about Packages, modules, and files.

The main goal was:

  • to ease the burden of loading files
  • with robust recursive includes over package subdirectories

https://github.com/djsegal/Boot.jl


Example from Readme

Transforms:

module Foo

  include("int.jl")
  include("float.jl")

  include("ops/plus.jl")
  include("ops/minus.jl")
  include("ops/times.jl")
  include("ops/divide.jl")

  include("ops/calc/int.jl")
  include("ops/calc/diff.jl")

end

Into:

module Foo

  using Boot

  include_folder(Foo, @__FILE__)

end

I tried it:

julia> using JuAFEM
INFO: Precompiling module JuAFEM. 
WARNING: Method definition _get_gauss_tridata(Int64) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Quadrature/gaussquad_tri_table.jl:5 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Quadrature/gaussquad_tri_table.jl:5.
WARNING: Method definition _get_gauss_tetdata(Int64) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Quadrature/gaussquad_tet_table.jl:3 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Quadrature/gaussquad_tet_table.jl:3.
WARNING: Method definition (::Type{JuAFEM.DirichletBoundaryCondition})(Function, Base.Set{Int64}, Symbol, Array{Int64, 1}, Int64) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43.
WARNING: Method definition (::Type{JuAFEM.DirichletBoundaryCondition})(Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43.
WARNING: replacing docs for 'JuAFEM.DirichletBoundaryCondition :: Union{}' in module 'JuAFEM'.
WARNING: replacing docs for 'JuAFEM.CellValues :: Union{}' in module 'JuAFEM'.
WARNING: Method definition (::Type{JuAFEM.CellScalarValues{dim, T<:Real, refshape<:JuAFEM.AbstractRefShape}})(Any, Any, Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44.
WARNING: replacing docs for 'JuAFEM.FaceValues :: Union{}' in module 'JuAFEM'.
WARNING: Method definition (::Type{JuAFEM.UpdateFlags})(Bool, Bool, Bool) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:3 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:3.
WARNING: Method definition (::Type{JuAFEM.UpdateFlags})(Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:3 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:3.
WARNING: Method definition (::Type{JuAFEM.UpdateFlags})() in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:8 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:8.
WARNING: Method definition Type(Array{Any, 1}, Type{JuAFEM.UpdateFlags}) in module JuAFEM overwritten.
WARNING: Method definition (::Type{JuAFEM.DirichletBoundaryCondition})(Function, Base.Set{Int64}, Symbol, Array{Int64, 1}, Int64) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43.
WARNING: Method definition (::Type{JuAFEM.DirichletBoundaryCondition})(Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43.
WARNING: replacing docs for 'JuAFEM.DirichletBoundaryCondition :: Union{}' in module 'JuAFEM'.
WARNING: replacing docs for 'JuAFEM.CellValues :: Union{}' in module 'JuAFEM'.
WARNING: Method definition (::Type{JuAFEM.CellScalarValues{dim, T<:Real, refshape<:JuAFEM.AbstractRefShape}})(Any, Any, Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44.
WARNING: replacing docs for 'JuAFEM.FaceValues :: Union{}' in module 'JuAFEM'.
WARNING: Method definition (::Type{JuAFEM.FaceScalarValues{dim, T<:Real, refshape<:JuAFEM.AbstractRefShape}})(Any, Any, Any, Any, Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/face_values.jl:47 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/face_values.jl:47.
WARNING: replacing docs for 'JuAFEM.CellValues :: Union{}' in module 'JuAFEM'.
WARNING: Method definition (::Type{JuAFEM.CellScalarValues{dim, T<:Real, refshape<:JuAFEM.AbstractRefShape}})(Any, Any, Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44.
WARNING: replacing docs for 'JuAFEM.FaceValues :: Union{}' in module 'JuAFEM'.
WARNING: Method definition (::Type{JuAFEM.FaceScalarValues{dim, T<:Real, refshape<:JuAFEM.AbstractRefShape}})(Any, Any, Any, Any, Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/face_values.jl:47 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/face_values.jl:47.
/Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl
WARNING: replacing docs for 'JuAFEM.CellValues :: Union{}' in module 'JuAFEM'.
WARNING: Method definition (::Type{JuAFEM.CellScalarValues{dim, T<:Real, refshape<:JuAFEM.AbstractRefShape}})(Any, Any, Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44.
ERROR: LoadError: LoadError: UndefVarError: QuadratureRule not defined
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:576
 [2] include(::String) at ./sysimg.jl:14
 [3] #include_folder#14(::Bool, ::Array{Any,1}, ::Function, ::Module, ::String) at /Users/kristoffer/.julia/v0.6/Boot/src/include_folder.jl:63
 [4] include_folder(::Module, ::String) at /Users/kristoffer/.julia/v0.6/Boot/src/include_folder.jl:3
 [5] include_from_node1(::String) at ./loading.jl:576
 [6] include(::String) at ./sysimg.jl:14
 [7] anonymous at ./<missing>:2
while loading /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl, in expression starting on line 53
while loading /Users/kristoffer/Dropbox/julia/JuAFEM/src/JuAFEM.jl, in expression starting on line 33
ERROR: Failed to precompile JuAFEM to /Users/kristoffer/.julia/lib/v0.6/JuAFEM.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:497
 [3] require(::Symbol) at ./loading.jl:405

This also seems to take significantly longer time than manual includes. Perhaps this is because the functions are parsed, and instantiated multiple times, as shown by the overwrite warnings.

There is currently no reliable way to delete methods in Julia.

I don’t really see what problem this package is trying to solve?

Having a package that rewrite your sources to insert the necessary includes seems like a better approach instead of doing it dynamically every time the package is loaded.

3 Likes

Although one of the things that i love about Julia is that I don’t need to run any separate scripts that pre-process my code…

The reason you got an error is because you didn’t remove all your include statements.

Cheers, removing the extra include statement makes it load properly. I’m still seeing a 40% extra precompilation time and a ~300% load time after precompilation:

pre:

julia> tic(); using JuAFEM; print(""); toc()
elapsed time: 1.845756564 seconds
1.845756564

post:

julia> tic(); using JuAFEM; print(""); toc()
WARNING: Method definition Type(Array{Any, 1}, Type{JuAFEM.UpdateFlags}) in module JuAFEM overwritten.
WARNING: Method definition (::Type{JuAFEM.DirichletBoundaryCondition})(Function, Base.Set{Int64}, Symbol, Array{Int64, 1}, Int64) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43.
WARNING: Method definition (::Type{JuAFEM.DirichletBoundaryCondition})(Function, Base.Set{Int64}, Symbol, Array{Int64, 1}, Int64) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43.
WARNING: Method definition (::Type{JuAFEM.DirichletBoundaryCondition})(Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43.
WARNING: Method definition (::Type{JuAFEM.DirichletBoundaryCondition})(Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/Dofs/DirichletBoundaryConditions.jl:43.
WARNING: Method definition (::Type{JuAFEM.UpdateFlags})() in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:8 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:8.
WARNING: Method definition (::Type{JuAFEM.UpdateFlags})(Bool, Bool, Bool) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:3 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:3.
WARNING: Method definition (::Type{JuAFEM.UpdateFlags})(Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:3 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/iterators.jl:3.
WARNING: Method definition (::Type{JuAFEM.CellScalarValues{dim, T<:Real, refshape<:JuAFEM.AbstractRefShape}})(Any, Any, Any, Any, Any, Any, Any) in module JuAFEM at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44 overwritten at /Users/kristoffer/Dropbox/julia/JuAFEM/src/FEValues/cell_values.jl:44.
elapsed time: 5.985319603 seconds
5.985319603

I also have some code that runs at “compile time”, i.e. when the file is included, to do some caching during precompilation. Will this caching run multiple times using this package?

Furthermore, it seems that if you have a syntax error in your file, or more precisely, if loading the file throws in any way, the file will just be ignored.

Just reimplemented the core of Boot.jl from scratch.

It now uses Julia’s compiler to load every file dynamically. (and works pretty well on your project)

// at this point, it uses eval for loading all the parts, so file line information is currently lost


additionally, the compiler was only really tested on your code and my test suite.

therefore it will take some testing on other projects before it’s production ready.

(see this file to get a gist of what probably will explode on new projects)

Yes, tried with Tensors.jl:


julia> @time using Tensors
INFO: Precompiling module Tensors.
WARNING: eval from module Boot to Tensors:
quote Expr(:line, 3, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to Tensors:
quote Expr(:::, :v, :T)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to Tensors:
quote Expr(:<:, :T, :Real)::Any end
  ** incremental compilation may be broken for this module **

ERROR: LoadError: Unable to determine what to do with node of type: <:
Stacktrace:
 [1] clean_shard(::Expr) at /Users/kristoffer/.julia/v0.6/Boot/src/clean_shard.jl:90
 [2] clean_shard(::Expr) at /Users/kristoffer/.julia/v0.6/Boot/src/clean_shard.jl:62
 [3] clean_shard(::Expr) at /Users/kristoffer/.julia/v0.6/Boot/src/clean_shard.jl:36 (repeats 5 times)
 [4] clean_shard(::Expr) at /Users/kristoffer/.julia/v0.6/Boot/src/clean_shard.jl:22 (repeats 2 times)
 [5] attempt_file_load(::Module, ::Dict{AbstractString,Any}) at /Users/kristoffer/.julia/v0.6/Boot/src/attempt_file_load.jl:31
 [6] #include_folder#3(::Bool, ::Array{Any,1}, ::Function, ::Module, ::String) at /Users/kristoffer/.julia/v0.6/Boot/src/include_folder.jl:58
 [7] include_folder(::Module, ::String) at /Users/kristoffer/.julia/v0.6/Boot/src/include_folder.jl:5
 [8] include_from_node1(::String) at ./loading.jl:576
 [9] include(::String) at ./sysimg.jl:14
 [10] anonymous at ./<missing>:2
while loading /Users/kristoffer/Dropbox/julia/Tensors/src/Tensors.jl, in expression starting on line 117
ERROR: Failed to precompile Tensors to /Users/kristoffer/.julia/lib/v0.6/Tensors.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:497
 [3] require(::Symbol) at ./loading.jl:405

On JuAFEM I get:

julia> using JuAFEM
INFO: Precompiling module JuAFEM.
WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 6, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:::, :quad_type, :Symbol)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:::, :order, :Int)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 7, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:if, Expr(:call, :==, :quad_type, :legendre)::Any, Expr(:block, Expr(:line, 8, :none)::Any, Expr(:tuple, :p, :w)::Any = Expr(:call, Expr(:., :GaussQuadrature, :legendre)::Any, :Float64, :order)::Any)::Any, Expr(:block, Expr(:line, 9, :none)::Any, Expr(:if, Expr(:call, :==, :quad_type, :lobatto)::Any, Expr(:block, Expr(:line, 10, :none)::Any, Expr(:tuple, :p, :w)::Any = Expr(:call, Expr(:., :GaussQuadrature, :legendre)::Any, :Float64, :order, Expr(:., :GaussQuadrature, :both)::Any)::Any)::Any, Expr(:block, Expr(:line, 12, :none)::Any, Expr(:call, :throw, Expr(:call, :ArgumentError, "unsupported quadrature rule")::Any)::Any)::Any)::Any)::Any)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 14, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:curly, :Vector, :Float64)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 15, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 16, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote :count = 1 end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 17, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:->, :j, Expr(:block, Expr(:line, 17, :none)::Any, Expr(::, 1, :order)::Any)::Any)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 18, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 18, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 19, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:ref, :points, :count)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 20, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote :weight = 1 end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 21, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:->, :j, Expr(:block, Expr(:line, 21, :none)::Any, Expr(:*=, :weight, Expr(:ref, :w, Expr(:curly, :i_, :j)::Any)::Any)::Any)::Any)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 22, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:ref, :weights, :count)::Any = :weight end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 23, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:+=, :count, 1)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 25, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 4, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:::, :quad_type, :Symbol)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:::, :order, :Int)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 5, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:call, :==, :quad_type, :legendre)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:block, Expr(:line, 6, :none)::Any, :data = Expr(:call, :_get_gauss_tridata, :order)::Any)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 7, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:call, :==, :quad_type, :legendre)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:block, Expr(:line, 8, :none)::Any, :data = Expr(:call, :_get_gauss_tetdata, :order)::Any)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:block, Expr(:line, 10, :none)::Any, Expr(:call, :throw, Expr(:call, :ArgumentError, "unsupported quadrature rule")::Any)::Any)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 12, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote :n_points = Expr(:call, :size, :data, 1)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 13, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 15, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote :p = Expr(::, 1, Expr(:call, :size, :data, 1)::Any)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 16, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:ref, :points, :p)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:->, :i, Expr(:block, Expr(:line, 16, :none)::Any, Expr(:ref, :data, :p, :i)::Any)::Any)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 18, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 19, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:block, Expr(:line, 10, :none)::Any, Expr(:macro, Expr(:call, :debug, :ex)::Any, Expr(:block, Expr(:line, 11, :none)::Any, Expr(:return, :nothing)::Any)::Any)::Any)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 6, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:., :Base, :copy)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:line, 7, :none)::Any end
  ** incremental compilation may be broken for this module **

WARNING: eval from module Boot to JuAFEM:
quote Expr(:call, :typeof, :cv)::Any end
  ** incremental compilation may be broken for this module **

Hi @kristoffer.carlsson, can you try the master branch on Tensors.jl and JuAFEM.jl again?

I think I got it working. You might need to clear the precompiled cache first though:

map(rm, Base.find_all_in_cache_path(:Tensors))
map(rm, Base.find_all_in_cache_path(:JuAFEM))

// also, thanks to @vchuravy for that clear cache command!

Wrote up a quick gist with performance changes:


Main conclusion was that:

  • Using Boot.jl led to ~40% slower (initial) compilation times for both packages
  • But did not alter performance in either package for subsequent reloads

// further, each package was only ~25% slower when adjusting for the compile time of Boot.jl itself

However, this did not attempt to use Boot.jl style loading for both JuAFEM and (its REQUIRE’d) Tensors at the same time. (which would likely change the results)