Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pkg.add("Distributions") ERROR: key not found: "Sampling" #262

Closed
floswald opened this issue Jul 19, 2014 · 13 comments
Closed

Pkg.add("Distributions") ERROR: key not found: "Sampling" #262

floswald opened this issue Jul 19, 2014 · 13 comments

Comments

@floswald
Copy link

I get this error when trying to install on a new installation. I suspect the error comes from here rather than GLM where I first registered this: JuliaStats/GLM.jl#81

@lindahua
Copy link
Contributor

This is weird. Neither GLM nor Distributions depend on Sampling (which was removed from METADATA). Can you do Pkg.update() first, and redo the add operation again?

@floswald
Copy link
Author

I did that just now - nothing changed. I still get

julia> Pkg.add("Distributions")
ERROR: key not found: "Sampling"

it is very strange because my installation is brand new, so there shouldn't be any weird dependencies dangling around. what would you suggest next?

@floswald
Copy link
Author

maybe you can spot anything here?

julia> Pkg.status()
6 required packages:
 - Cairo                         0.2.14
 - DataFrames                    0.5.7
 - Debug                         0.0.3
 - FactCheck                     0.1.2
 - PyPlot                        1.2.9
 - Winston                       0.11.2
14 additional packages:
 - ArrayViews                    0.4.6
 - BSplines                      0.0.3              master
 - BinDeps                       0.2.14
 - Color                         0.2.10
 - DataArrays                    0.2.0
 - GZip                          0.2.13
 - Homebrew                      0.0.6
 - IniFile                       0.2.2
 - PyCall                        0.4.8
 - Reexport                      0.0.1
 - SortingAlgorithms             0.0.1
 - StatsBase                     0.6.1
 - Tk                            0.2.13
 - URIParser                     0.0.2

@lindahua
Copy link
Contributor

Let me look into this.

@lindahua
Copy link
Contributor

I can confirm this -- by using a brand new .julia directory.

@lindahua
Copy link
Contributor

The issue looks like as follows:

Distributions did depend on Sampling temporarily a few months ago (version 0.4.8 and 0.4.9) , and no longer depends on it afterwards. Actually, no package is depending on Sampling now -- that's why I remove it from METADATA.

However, the dependency analysis done within Pkg.add wants to retrieve the information for every dependency ever included in any previous version, thus causing this breakage.

I will reinstate Sampling in METADATA for now to workaround this issue.

However, I think Julia base should allow an old dependency to be removed from METADATA without causing the failure of adding newer version of the package.

cc: @StefanKarpinski

@lindahua
Copy link
Contributor

@floswald I have reinstated Sampling in METADATA. Please see whether it works now (do Pkg.update first).

@nihonjinrxs
Copy link

Thanks @lindahua. @floswald thanks for creating the issue.

@IainNZ
Copy link
Contributor

IainNZ commented Jul 19, 2014

Oh man its Stats/StatsBase all over again. The golden rule is "Never remove a package from METADATA, only deprecate". We need to put this somewhere so people who push direct to METADATA can see it.

@floswald
Copy link
Author

Good job @lindahua. All back online.

@johnmyleswhite
Copy link
Member

That Golden Rule is kind of a bummer. We should see if we can make things a little more robust to removal of packages.

@StefanKarpinski
Copy link

If you remove a package, you have to remove all versions of other packages that depend on it – otherwise those versions will obviously be broken and uninstallable. I'm not sure how else things could possibly work. What you can do if you want to remove a package entirely is simultaneously remove all the versions of other packages that depend on it, or if they didn't really depend on it, remove the dependency from their requirements. Then everything should work.

@kmsquire
Copy link
Contributor

Probably better to continue the discussion in JuliaLang/julia#6669.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants