I have the same version of Julia and same Pkg.update() vintage on 2 different computers. On one, when I merge data frames, I use join() and the other innerjoin() – on each of the two computers, the alternative join command produces an error. This makes me think I might have updated some package incorrectly, but every other command works identically in a long program. Here is the error using innerjoin on my home computer:
LoadError: UndefVarError: innerjoin not defined
join
was deprecated in favor of innerjoin
. Can you post the results of ] st
on both computers?
Thanks.
(@v1.6) pkg> st
Status `~/.julia/environments/v1.6/Project.toml`
[c9ce4bd3] ArchGDAL v0.5.0
[c52e3926] Atom v0.12.32
[6e4b80f9] BenchmarkTools v1.1.1
[336ed68f] CSV v0.5.23
[35d6a980] ColorSchemes v3.13.0
[34da2185] Compat v3.31.0
[a93c6f00] DataFrames v0.20.0
[1313f7d8] DataFramesMeta v0.5.0
[31c24e10] Distributions v0.21.12
[9d5cd8c9] FixedEffectModels v0.10.9
[1f615318] FredApi v0.2.0
[add2ef01] GDAL v1.2.2
[38e38edf] GLM v1.4.2
[28b8d3ca] GR v0.44.0
[e5e0dc1b] Juno v0.8.4
[e1d29d7a] Missings v0.4.5
[429524aa] Optim v0.22.0
[91a5bcdd] Plots v0.28.4
[c3e4b0f8] Pluto v0.12.7
[d330b81b] PyPlot v2.9.0
[1a8c2f83] Query v1.0.0
[6f49c342] RCall v0.13.6
[d71aba96] ReadStat v1.1.0
[d519eb52] RegressionTables v0.5.1
[89279098] Shell v0.0.1
[1463e38c] StatFiles v0.8.0
[3eaba693] StatsModels v0.6.21
[f3b207a7] StatsPlots v0.13.0
[fd094767] Suppressor v0.2.0
[9e3dc215] TimeSeries v0.16.1
[ade2ca70] Dates
That’s my home computer. Perhaps I copied some list of packages in a prior update that froze?
DataFrames.jl 20.0
is over a year old, see here.
I would make two suggestions
- Stop using your main environment. Get used to making a separate
Project.toml
for each thing you work on.
- If you want to upgrade, I would suggest going slowly with deprecation warnings turned on. However you don’t have to if things are working.
What do you mean by "same Pkg.update()
? Not sure what that means.
Thanks again. What I mean is I ran Pkg.update() about the same time. I am naively assuming that’s how to get the most recent version of all packages at once?
No, Pkg.update()
will update packages within constraints given by breaking version numbers. So it won’t automatically update a 4.5.3
to a 5.0.0
.
One of the reasons people discuss so much the “problem” of packages that are not at 1.0 yet is because pre-1.0, a move from 0.2
to 0.3
is seen as a breaking change according to the package manager. This is what’s happening with DataFrames. It won’t update from 0.20
to 0.21
when you do Pkg.update()
.
1 Like
Thanks again. Pardon laziness, but while I have you what is the right way to update to v1 for this and other packages? Do I look through a .toml file and find everything with a 0, delete, and then install? Edit the toml and replace the 0s and update? Something else?
Definitely don’t edit the Project.toml
like that.
I would just do ] add DataFrames@0.22.0
and see what warnings / errors get spit out, fix those, and then upgrade to 1.2 and see what happens.
Super helpful. Indeed FredAPI (I never use but nice) is the problem. As a general matter, from skimming the Pkg documentation, not seeing how as a general matter I make sure no such barriers to updates?
You probably don’t want to avoid these barriers. Since by definition upgrading beyond what Pkg
does has a chance of breaking your code. So any upgrades beyond that should be made deliberately.