# CSV stuck on old version

**URL:** <https://discourse.julialang.org/t/csv-stuck-on-old-version/34581>\
**Category:** General Usage\
**Tags:** question, pkg, csv\
**Created:** [February 13, 2020, 2:59pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581 "2020-02-13T14:59:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 13, 2020, 2:59pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/1 "2020-02-13T14:59:19Z")

</div>

I made a package (it’s useful only to me and formats data to a database format I need):  
[https://github.com/yakir12/Format2DB.jl](https://github.com/yakir12/Format2DB.jl)  
where the `CSV.jl` dependency is set to [v0.5.23](https://github.com/yakir12/Format2DB.jl/blob/d9d5c9518aa3cec918330944b9ac6d535dcf3140/Manifest.toml#L52).

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`.

---

<div class="post-metadata">

**Author:** ![ianfiske](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Post date:** [February 13, 2020, 3:12pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/2 "2020-02-13T15:12:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 13, 2020, 3:14pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/3 "2020-02-13T15:14:34Z")

</div>

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

```julia
(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 

```

---

<div class="post-metadata">

**Author:** ![ianfiske](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Post date:** [February 13, 2020, 3:15pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/4 "2020-02-13T15:15:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 13, 2020, 3:18pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/5 "2020-02-13T15:18:23Z")

</div>

> [@ianfiske](#):
>
> maybe give it a try

For sure! I’ll report back.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 13, 2020, 3:25pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/6 "2020-02-13T15:25:31Z")

</div>

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

```julia
(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`](https://github.com/yakir12/Format2DB.jl/blob/0faeb7fa211ad3c4f96ed8938686f27243c34d63/Manifest.toml#L405).

---

<div class="post-metadata">

**Author:** ![ianfiske](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Post date:** [February 13, 2020, 3:32pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/7 "2020-02-13T15:32:14Z")

</div>

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:

```julia
(tmp) pkg> add Tables@0.2.11

```

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 13, 2020, 3:46pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/8 "2020-02-13T15:46:33Z")

</div>

It worked! Thanks!

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

---

<div class="post-metadata">

**Author:** ![ianfiske](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Post date:** [February 13, 2020, 3:49pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/9 "2020-02-13T15:49:54Z")

</div>

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](https://github.com/JuliaData/Tables.jl/issues/152). Thanks for verifying someone else is seeing the same thing! Sometimes the version interactions baffle me.

---

<div class="post-metadata">

**Author:** ![quinnj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quinnj/32/11_2.png) [@quinnj](https://discourse.julialang.org/u/quinnj)\
**Post date:** [February 13, 2020, 6:29pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/10 "2020-02-13T18:29:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![js135005](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/js135005/32/8219_2.png) [@js135005](https://discourse.julialang.org/u/js135005)\
**Post date:** [February 13, 2020, 9:28pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/11 "2020-02-13T21:28:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [February 13, 2020, 10:02pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/12 "2020-02-13T22:02:10Z")

</div>

> [@quinnj](#):
>
> DataFrames

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

---

<div class="post-metadata">

**Author:** ![quinnj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quinnj/32/11_2.png) [@quinnj](https://discourse.julialang.org/u/quinnj)\
**Post date:** [February 13, 2020, 10:54pm UTC](https://discourse.julialang.org/t/csv-stuck-on-old-version/34581/13 "2020-02-13T22:54:44Z")

</div>

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