Sometimes you mess up something and want to get a clean install, but
pkg> rm Pkg
pkg> gc
pkg> add Pkg
is not guaranteed to delete the installation folder. Maybe it would be useful with a reinstall (or readd...) command that force-deletes the installation folder?
In what way would you mess up?
As we move to the new BB stuff where installed packages are immutable, it seems like there's less room for things to get messed up in the first place. It's also pretty easy to rm -rf ~/.julia/packages/$pkg to remove all versions of a package.
@StefanKarpinski Only if you are an expert already... Average user doesn't know what's where, and if it is just fine/enough to remove them like that. Having to leave the Julia for this also damages the reputation of Julia's package manager, at least to me it does.
Just had to do what @StefanKarpinski said, and I do not know what caused the issue. I feel lucky that I have encountered this issue just yesterday. If I hadn't, and a reinstall in Pkg was present, a simple press on the tab key would show me the reinstall method, but I don't know how I would find out all this without going all the way to Google and loss of attention and time due to several context switches involved.
Again, what is there to mess up? That some badly written package fails the installation process and leaves it in a bad state where build doesn't work anymore? I'm not against this but I just want to know it what situations we should recommend this command.
I don't know. <-- I do not say this just for what it means. I am also saying it to emphasize that as an average user, I do not know what exactly and how I messed up, let alone how to fix it, had I not encountered this thread.
The problem was with the Revise.jl. It started off with saying that it is "stale" or something, and that it will precompile it. Then, the error was saying that precompile couldn't be done. I remember 2 errors written in red, do not remember anything more than them being about precompile.
I tried build Revise first, which sometimes had fixed my problems, but it did not help this time. Then I resorted to what was written here.
Revise.jl was working fine yesterday on my computer A. I worked further on another machine B, adding and using Plots.jl. I pulled the stuff onto machine A, carefully first added Plots/GR/PlotlyJS/PGFPlots and then manually initiated the precompile.
Then Julia wanted a precompile on Revise.jl upon using it, and... yeah, the rest it at the 2nd and 3rd paragraph.
If we go ahead with this, I would prefer a flag to add e.g pkg> add --clean Foo. It would be similar to #935
That seems like it wouldn鈥檛 have the discoverability advantage. I agree that in an ideal world, there would never be any cause to reinstall but until we live in that world, maybe it鈥檚 a good idea to have this.
Proposed behavior: reinstall it doesn鈥檛 affect the project file or the manifest, it just reinstalls any packages matching the given name in the manifest. Since it doesn鈥檛 really matter if we reinstall multiple things by the same name, this doesn鈥檛 have to worry about the usual disambiguation issues. If called with no arguments, reinstall everything in the manifest.
So when would one use this? It will download the same bits as before so the only reason would be if the package trashed its own files somehow? And it wouldn't do that next time?
I dunno, but apparently it鈥檚 a situation people encounter? Hasn鈥檛 happened to me.
It will download the same bits as before so the only reason would be if the package trashed its own files somehow?
Or if you (or some process) did...
So we're fully against the proposed behavior:
Proposed behavior: reinstall it doesn鈥檛 affect the project file or the manifest, it just reinstalls any packages matching the given name in the manifest. Since it doesn鈥檛 really matter if we reinstall multiple things by the same name, this doesn鈥檛 have to worry about the usual disambiguation issues. If called with no arguments, reinstall everything in the manifest.
Is the use-case when someone manages to edit some files (even though they are read only) in their .julia/packages and are all confused because of that? If those folders where immutable by design it would be quite easy to have some fsck command...
True, a check and fix command would be strictly better here.