-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 operations fail for packages in LOAD_PATH #8679
Comments
If the package isn't in |
correct. no seems to me it would be nice to have a formal way of interacting with the system wide packages in admittedly a low priority, but long term would be good, no? |
How would Pkg.installed() work? What makes a package? What happens if you do Pkg.add and there is a name conflict? etc. Seems like a massive increase in complexity for little gain. There is a chance of the whole |
A libgit2-based Also sort of ties into how we want to implement #5155. If the idea is to move some pieces of Base out into packages and promote other packages to some sort of default installation mechanism, will need to figure out a good way to do it. |
Having convinced a number of people in our department to try Julia, I came to leave an issue about I saw #9699, which adds tab-completion for these system-wide packages, but I don't know what would be required to make them show up in |
We had further issues (which have so far showed up only in Nettle.jl) because I guess I'm saying that
and it seems like these might be at odds. Basically, if we want to store some packages in a place that's in To answer @IainNZ's questions, I would expect the following:
I'm going to have a quick look at the Pkg code to try and get a better handle on the way things work right now. Handling a scenario where a sysadmin can provide a system-wide copy of Julia and some commonly-used packages would be really nice. |
@swt30, while I agree that Pkg functionality should work, where possible, for packages installed in the Using So, for example, Nettle should use |
@stevengj, this is exactly what I was looking for, thanks. I'll submit a PR to Nettle to fix that problem for now and keep an eye out for any other packages that have similar problems as we install more of them. A shorter syntax would be nice - |
@swt30, here is a list of packages that currently use A lot of PRs, unfortunately. Probably you're right that (But it still seems wrong to me to use |
cc: @StefanKarpinski |
I guess this could be made to work, but things that are installed elsewhere aren't necessarily packages at all, nor were they installed via |
Indeed, this is what I think I was getting at with my comment from October (wooah)
|
I mean, you could look for |
Let me propose a simple criterion: if Foo is in the load path somewhere, it has the Pkg directory structure ( Basically, the question is, should systemwide packages in (e.g. in More concretely, it is confusing for systemwide packages to be omitted in (I think we all agree that |
I went and made PR's or committed fixes to master for
which is approximately the subset of that list that I've personally used. Jameson recommending doing things using |
It's a little telling that there's duplication of the same if isfile(deps.jl)
include(deps.jl)
else
error("PACKAGE not built correctly; please run Pkg.build(PACKAGE)")
end kind of logic in a couple places, when that seems like something that could be handled better by the package loader, but these changes should help in the meantime. I'll check a few more packages that I might use: Bokeh, Lexicon, ProfileView, RDatasets, Weave. |
@timholy, I'm submitting a PR on ProfileView to make this change, but I can't do anything immediately about this line: https://github.com/timholy/ProfileView.jl/blob/151c2b3722eaa9d222bbf6910b905c5e5101bdbc/src/ProfileView.jl#L14 which assumes ImageView is installed in Pkg.dir(). |
Part of the trouble is that BinDeps is an external package rather than part of the package manager in base Julia. And it's more appropriate for it to be maintainable (... sort of ...) separately from base Julia and on its own release schedules. There are lines to this extent in the auto-generated |
I was bitten by this again in Interact.jl, which includes the test if Pkg.installed("IJulia") >= v"0.1.3-" Unfortunately since a system-wide version of IJulia doesn't show up in |
@swt30, the right thing is to take a page from autoconf and to test for features, not versions; i.e. if a specific function was added to IJulia that is needed, look for the presence of that function. However, at this point @shashi can probably just remove the test for "ancient" (year+ old) IJulia versions. |
and add the version assumptions to |
That makes sense - I'll look at submitting a PR to Interact. I've also been thinking that making soft links from |
@tkelman, Interact does not require IJulia; it is an optional dependency. |
Pkg.dir() won't work if package is installed outside the standard package location but available in the LOAD_PATH, e.g. on JuliaBox. Using relative paths avoids this issue while accessing other files in the package. See JuliaLang/julia#8679.
Given the docs for |
Obsolete with new package manager. |
it works fine if the package is in .julia/v0.x, but if it is somewhere else then it claims there is no
test/runtests.jl
even if myLOAD_PATH
is set such that i canusing
it. i know that the recommended dev cycle is to keep packages in .julia, but would it make sense to make Pkg.test() work otherwise?The text was updated successfully, but these errors were encountered: