CSV stuck on old version

I made a package (it’s useful only to me and formats data to a database format I need):

where the CSV.jl dependency is set to v0.5.23.

But if I start a new fresh environment and I ]add https://github.com/yakir12/Format2DB.jl, for some reason, CSV.jl is set to v0.3.1. Which actually doesn’t work for me (I suspect CSV.File didn’t exit back then).

Any ideas on how to move forward on this…?

BTW, my “parent” stack includes only BenchmarkTools, PkgSkeleton, and Revise.

For a MWE simply activate and add https://github.com/yakir12/Format2DB.jl in a temp folder or some such and look for the reported version of CSV.jl. It should be north of v0.5 but it will be v0.3.1.

I think this has to do with a recent update to Tables.jl. I saw the same thing and downgraded Tables to v0.2.11 and CSV was freed again.


But Tables is not one of the direct dependencies? How would I even affect that then?

(Format2DB) pkg> st
Project Format2DB v0.1.0
    Status `~/dungProject/Format2DB/Project.toml`
  [336ed68f] CSV v0.5.23
  [23992714] MAT v0.7.0
  [92933f4c] ProgressMeter v1.2.0
  [09ab397b] StructArrays v0.4.1
  [d6d074c3] VideoIO v0.6.10
  [ade2ca70] Dates 
  [8bb1440f] DelimitedFiles 
  [2f01184e] SparseArrays 
  [cf7118a7] UUIDs 

Was the same situation for me, but I solved it by adding Tables as a direct dep anyhow (with fixed version). I don’t quite understand either, worked for me – maybe give it a try?

For sure! I’ll report back.

Erg… I dunno why, but Tables.jl is stuck on v1:

(v1.3) pkg> activate .
Activating new environment at `~/tmp/Project.toml`

(tmp) pkg> add https://github.com/yakir12/Format2DB.jl
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/yakir12/Format2DB.jl`
  Updating git-repo `https://github.com/yakir12/Format2DB.jl`
 Resolving package versions...
  Updating `~/tmp/Project.toml`
  [ee64474f] + Format2DB v0.1.0 #master (https://github.com/yakir12/Format2DB.jl)
  Updating `~/tmp/Manifest.toml`
  [13072b0f] + AxisAlgorithms v1.0.0
  [9e28174c] + BinDeps v1.0.0
  [b99e7846] + BinaryProvider v0.5.8
  [a74b3585] + Blosc v0.5.1
  [e1450e63] + BufferedStreams v1.0.0
  [631607c0] + CMake v1.2.0
  [d5fb7624] + CMakeWrapper v0.2.3
  [336ed68f] + CSV v0.3.1
  [324d7699] + CategoricalArrays v0.7.7
  [944b1d66] + CodecZlib v0.6.0
  [3da002f7] + ColorTypes v0.9.1
  [c3611d14] + ColorVectorSpace v0.8.3
  [5ae59095] + Colors v0.11.2
  [34da2185] + Compat v2.2.0
  [150eb455] + CoordinateTransformations v0.5.0
  [9a962f9c] + DataAPI v1.1.0
  [a93c6f00] + DataFrames v0.20.2
  [9a8bc11e] + DataStreams v0.4.2
  [864edb3b] + DataStructures v0.17.9
  [e2d170a0] + DataValueInterfaces v1.0.0
  [c87230d0] + FFMPEG v0.2.4
  [53c48c17] + FixedPointNumbers v0.7.1
  [ee64474f] + Format2DB v0.1.0 #master (https://github.com/yakir12/Format2DB.jl)
  [c27321d9] + Glob v1.2.0
  [a2bd30eb] + Graphics v1.0.1
  [f67ccb44] + HDF5 v0.12.5
  [bbac6d45] + IdentityRanges v0.3.1
  [a09fc81d] + ImageCore v0.8.11
  [02fcd773] + ImageTransformations v0.8.3
  [7d512f48] + InternedStrings v0.7.0
  [a98d9a8b] + Interpolations v0.12.5
  [41ab1584] + InvertedIndices v1.0.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [682c06a0] + JSON v0.21.0
  [23992714] + MAT v0.7.0
  [dbb5928d] + MappedArrays v0.2.2
  [e1d29d7a] + Missings v0.4.3
  [77ba4419] + NaNMath v0.3.3
  [6fe1bfb0] + OffsetArrays v1.0.2
  [efe28fd5] + OpenSpecFun_jll v0.5.3+1
  [bac558e1] + OrderedCollections v1.1.0
  [5432bcbf] + PaddedViews v0.5.1
  [d96e819e] + Parameters v0.12.0
  [69de0a69] + Parsers v0.3.11
  [2dfb63ee] + PooledArrays v0.5.3
  [92933f4c] + ProgressMeter v1.2.0
  [c84ed2f1] + Ratios v0.4.0
  [189a3867] + Reexport v0.2.0
  [ae029012] + Requires v1.0.1
  [6038ab10] + Rotations v0.13.0
  [a2af1166] + SortingAlgorithms v0.3.1
  [276daf66] + SpecialFunctions v0.10.0
  [90137ffa] + StaticArrays v0.12.1
  [2913bbd2] + StatsBase v0.32.0
  [09ab397b] + StructArrays v0.4.0
  [3783bdb8] + TableTraits v1.0.0
  [bd369af6] + Tables v1.0.0 # <-------------- HERE
  [3bb67fe8] + TranscodingStreams v0.9.5
  [30578b45] + URIParser v0.4.0
  [d6d074c3] + VideoIO v0.6.10
  [ea10d353] + WeakRefStrings v0.5.8
  [efce3f68] + WoodburyMatrices v0.5.0
  [2a0f44e3] + Base64 
  [ade2ca70] + Dates 
  [8bb1440f] + DelimitedFiles 
  [8ba89e20] + Distributed 
  [9fa8497b] + Future 
  [b77e0a4c] + InteractiveUtils 
  [76f85450] + LibGit2 
  [8f399da3] + Libdl 
  [37e2e46d] + LinearAlgebra 
  [56ddb016] + Logging 
  [d6f4376e] + Markdown 
  [a63ad114] + Mmap 
  [44cfe95a] + Pkg 
  [de0858da] + Printf 
  [3fa0cd96] + REPL 
  [9a3f8284] + Random 
  [ea8e919c] + SHA 
  [9e88b42a] + Serialization 
  [1a1011a3] + SharedArrays 
  [6462fe0b] + Sockets 
  [2f01184e] + SparseArrays 
  [10745b16] + Statistics 
  [8dfed614] + Test 
  [cf7118a7] + UUIDs 
  [4ec0a83e] + Unicode 

Even though my package’s dependency on Tables is v0.2.11.

Packages don’t pin dependency versions with the Manifest.toml. Manifest.toml is for applications. If you want your package to restrict the Tables version, use the [compat] section in its Project.toml.

Or more simply, just pin the version in your tmp environment above:

(tmp) pkg> add Tables@0.2.11
1 Like

It worked! Thanks!

Still, a weird solution, but I guess this will get fixed at some point.

Agreed. Since I don’t quite understand the version interaction that’s causing it, just reported at https://github.com/JuliaData/Tables.jl/issues/152. Thanks for verifying someone else is seeing the same thing! Sometimes the version interactions baffle me.

1 Like

The issue here is I believe due to a past version of DataFrames (0.19.4) that had Tables.jl compat like ">= 0.2.3". With Tables.jl 1.0 now released, the pkg resolver sees that the current CSV release doesn’t support Tables.jl 1.0, so it tries to find a past version where it’s dependencies (including DataFrames) are all satisfied and due to the lack of correct bounds, finds the old version that “seems” to support Tables.jl 1.0, but actually doesn’t.

A good lesson in making sure we follow proper semver.


It looks as if JSONTables also prevents Tables from getting to 1.0.1 from 0.2.11. If I ]rm JSONTables, it causes a major downgrade of ODBC and PrettyTables.

Why even have a dependency on DataFrames? What does Tables need it for?

It’s not a Tables.jl dependency. CSV.jl currently has the DataFrames.jl dependency (which will soon not be the case).