Version and repo-rev Pkg Manager

#1

Can someone explain the difference between ‘repo-rev’ and ‘version’?
I tried to pin a package by doing

]rm DataFrames
]add DataFrames@0.14.1
]pin DataFrames@0.14.1

This did not work as expected. It resulted in the manifest entry shown below (there are various additional packages in the manifest).
I eventually copied the entry from a fresh environment (which does not contain the line ‘repo-rev’).
Can someone shed some light into this?

[[DataFrames]]
deps = ["CategoricalArrays", "CodecZlib", "Compat", "DataStreams", "Dates", "InteractiveUtils", "IteratorInterfaceExtensions", "LinearAlgebra", "Missings", "Printf", "Random", "Reexport", "SortingAlgorithms", "Statistics", "StatsBase", "TableTraits", "Tables", "Test", "TranscodingStreams", "Unicode", "WeakRefStrings"]
git-tree-sha1 = "9cfed75401d25d281076eb5d82de148ac2933f9e"
pinned = true
repo-rev = "0.14.1"
repo-url = "https://github.com/JuliaData/DataFrames.jl.git"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "0.17.1+"
#2

What happened? This works for me.

You should never have to modify the Manifest.toml manually like that.

repo-rev is there if you have checked out a specific git revision, version is the version.

3 Likes
#3

Thank you.
Actually, it did work.

I simply did not understand the output of st.
I thought I was still on v0.17.1+ as it shows as such (see below).
Turns out the #a0d44f6 refers to v0.14.1 which I wanted.

Why does is say “v0.17.1+” is installed when actually it is an earlier version?

(v1.0) pkg> activate .

(DecisionTrees) pkg> st
Project DecisionTrees v0.0.1
    Status `C:\Users\bernhard.konig\Documents\ASync\home\Code\Julia\DecisionTrees.jl\Project.toml`
  [336ed68f] CSV v0.4.2
  [a93c6f00] DataFrames v0.17.1+ #a0d44f6 (https://github.com/JuliaData/DataFrames.jl.git) ⚲
  [033835bb] JLD2 v0.1.2
  [a15396b6] OnlineStats v0.21.0
  [92933f4c] ProgressMeter v0.9.0
  [438e738f] PyCall v1.18.5
  [295af30f] Revise v1.1.0
  [2913bbd2] StatsBase v0.28.1
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [9a3f8284] Random
  [10745b16] Statistics

#4

When you have checked out an arbitrary commit like that Pkg can not know what version that corresponds to so we have to guess, and Pkg guesses “something newer than the latest release”, i.e. 0.17.1+.

#5

thank you.