Error precompiling DataFrames: UndefVarError: ComposedFunction not defined

Dear folks,

I work in a project using a specific Project.toml in which I have not updated the packages for a while because everything was working fine. When I start that project now and instantiate it with Pkg, there is an error when DataFrames is precompiled. I use Atom and Julia 1.4.0 on Ubuntu 18.04. The problem exists also after a fresh reboot and a new REPL session. However, it seems to work in a REPL session started from the shell (not in Atom). The stacktrace is

[ Info: Precompiling DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]
ERROR: LoadError: LoadError: UndefVarError: ComposedFunction not defined
Stacktrace:
 [1] top-level scope at /home/mk/.julia/packages/DataFrames/nxjiD/src/other/utils.jl:82
 [2] include(::Module, ::String) at ./Base.jl:377
 [3] include(::String) at /home/mk/.julia/packages/DataFrames/nxjiD/src/DataFrames.jl:1
 [4] top-level scope at /home/mk/.julia/packages/DataFrames/nxjiD/src/DataFrames.jl:109
 [5] include(::Module, ::String) at ./Base.jl:377
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:331 [inlined]
 [8] eval(::Expr) at ./client.jl:449
 [9] top-level scope at ./none:3
in expression starting at /home/mk/.julia/packages/DataFrames/nxjiD/src/other/utils.jl:79
in expression starting at /home/mk/.julia/packages/DataFrames/nxjiD/src/DataFrames.jl:109
ERROR: Failed to precompile DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0] to /home/mk/.julia/compiled/v1.4/DataFrames/AR9oZ_yCSnu.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922

The installed DataFrames version is [a93c6f00] DataFrames v1.1.1 but the same problem appears with older versions.

Do you have any ideas how to fix that? Thank you in advance.

Best regards, mk

ComposedFunction was introduced in Julia 1.6, which is why you are getting an error about ComposedFunction not being defined.

However there is still a problem, as DataFrames.jl should be smart enough to detect your lower Julia version and behave appropriately, see here.

The fact that it works in the shell but not Atom is interesting. I think somehow your Compat package is being held back by Atom.

Thank you for the answer. I forgot to say that I upgraded to DataFrames v1.1.1 after the problem appeared the first time. Before it was DataFrames v0.22.1 and Compat v3.23.0. I now reverted to that version which worked fine for several month. The problem appeared more or less from one day to the next. But I did not do any update to the project setting (and Atom also does not update automatically).

I gave it another try with the “original setting”, and can confirm it works in the shell but not in Atom :frowning: