--SGJ
--
--
I may be totally crazy for saying this, but I pretty strongly feel that it should be impossible to install Julia programs using something like apt-get. I've had endless nightmares with this in the past when apt-get style mechanisms and RubyGems fought to the death for control of my system.
Tom Short wrote:With any numerical software, if you change to a different version you cannot in general expect bit-exact reproducibility even on the same machine with the same compilers. Users understand this, I think, and every software distribution scheme will include information about the versions that are being installed.
I'm not sure that plays well with git reproducibility. I really like where Stefan's package system is going with respect to reproducibility, and he gets that by using one git directory. I also like how I can change any package in my .julia and develop right in .julia.
If you want to tell someone, "To get exactly the same results as me, don't use your distro's version, use julia version YYY and use Pkg to install commit XXX of this third-party code," you are still free to do so. And since my suggested load path priorities Pkg-installed code over distro-installed code, this will do what you want even if they previously installed the distro version of the package.
(For that matter, since the Pkg system only controls Julia code and not external C libraries, even using Pkg will not guarantee bit-reproducibility if e.g. the user has a different version of FFTW or OpenBLAS installed.)
That's not how system-wide software installation works. If you want to install stuff in your home directory, great, but that is orthogonal to deciding what to do for software that the distro or sysadmin wants to install system-wide. (And that is why $HOME/.julia should take precedence in the load path over system-wide paths: so that users can override the system-wide stuff with their own preferred versions of packages.)That seems at odds with having packages spread all over. Maybe the system packages can get pulled into the user's ~/.julia.
The key point is for Pkg and non-Pkg code to go in different standardized directories so that they don't fight for control over the same files, with the Pkg versions taking precedence if both are present. Also to respect the Unix/FHS/GNU hierarchy (particularly /usr vs. /usr/local).
Stefan Karpinski wrote:Yes, this a sensible policy. But to achieve this you still have to support both schemes and let the user and sysadmin decide which is appropriate.
I'm not convinced that multiple levels of packages are actually a good idea. Which version of that package am I using again? Am I loading the system one or the user one or the one that's in this project? They're all different versions! Every time I've tried to work with this, it ends up being kind of a nightmare. Instead, I always install to system on machines where I have root and I always install to the user on systems where I don't.
Imagine a multi-user machine where a sysadmin has installed some packages system-wide, but an individual user wants to experiment with a new package so she needs to install it in $HOME while still using the system-wide packages.
GNU/Linux distros have never and probably will never adopt this policy. If Julia gets packaged by a distro, it will use the shared version of FFTW, BLAS, etcetera packaged by the distro and not a Julia-specific version.If it's easy enough to manage what packages are installed for a project, I feel like not sharing or layering is by far the best approach. This is a bit like the OS shared library issue. OS X, which is not known for its lack of usability just makes each application have a self-contained set of its own libraries inside the application folder. Does it use a bit more disk space? Sure. But it works without headaches.
When in Rome, you need to dress like the Romans. Or at least allow the Romans to enter your house without requiring that they change their clothes first, to stretch the metaphor.
--
Stefan Karpinski wrote:Requiring every user to recompile their own version of Julia just to use one package that isn't installed systemwide? Seriously?
This approach would allow users with no special need to just use the system versions but then when they start having "special needs", they get a full copy and are no longer subject to the whims of the sysadmin.
Imagine if every language did this. "Oh, you want to use my C library and it is not installed? First go recompile your own version of gcc. And use the bleeding-edge git version, by the way. Oh, that version is not compatible with the old Debian system you are running on? Then it is simple, just first go compile your own operating system image and run it in a virtual machine...."
https://npmjs.org/doc/faq.htmlWhy can't npm just put everything in one place, like other package managers?
Not every change is an improvement, but every improvement is a change. This would be like asking git to do network IO for every commit. It's not going to happen, because it's a terrible idea that causes more problems than it solves.
It is much harder to avoid dependency conflicts without nesting dependencies. This is fundamental to the way that npm works, and has proven to be an extremely successful approach. See
folders(1)for more details.If you want a package to be installed in one place, and have all your programs reference the same copy of it, then use the
npm linkcommand. That's what it's for. Install it globally, then link it into each program that uses it.Whatever, I really want the old style 'everything global' style.
Write your own package manager, then. It's not that hard.
npm will not help you do something that is known to be a bad idea.
--
Stefan Karpinski wrote:So the distro manages the tk version, but Pkg manages the julia interface version? Sounds like a recipe for breakage.
On the other hand, it seems perfectly sane for the Julia package manager to have hooks to use OS-level package managers to install external dependencies like C libraries. The Tk package comes to mind. It would be great if doing Pkg.add("Tk") also hooked into apt/yum/port/homebrew and installed the tk libraries for you.
Not to mention that you are then in the business of adding interfaces to apt/yum/port/homebrew/julia/appstore/microsoft/ rather than letting distros/packagers do it for you if that is what they want.
--
Having the possibility of distributing packages through
apt/yum/pacman/... should not be thought as antagonistic to the Pkg+git
system, but rather as complementary. I think the use cases are
different: developers and power users will want the latest packages and
therefore use Git, while other users will probably prefer their
distribution package manager for stability and convenience.
I actually opened an issue on that very topic (before reading the
present thread), and there I give other reasons for playing nice with
the distribution package manager:
https://github.com/JuliaLang/julia/issues/1692
This seems a very sensible plan to me.
> All I'm suggesting is (a) put standard place(s) in the LOAD_PATH for
> non-Pkg code, (b) the load-path should respect the FHS when on Unix
> (/usr vs. /usr/local vs. $HOME should all co-exist), and (c) standardize
> a language version identifier in the load paths.
/ Toivo
--
--
--
--