-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Move compiled cache from DATAROOTDIR to LIBDIR #54353
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
base: master
Are you sure you want to change the base?
Conversation
The FHS specifies that only architecture-independent files should be put under /usr/share (DATAROOTDIR). Originally we only stored .ji files in the "compiled" directory, but now we also put .so files. Keep /usr/share and /usr/local/share in the default `DEPOT_PATH` for backward compatibility and because they can still be used for architecture-independent files such as environments or registries. Also fix a few uses of `"data"` which should have been "`DATAROOTDIR`" and wouldn't work if using a different `DATAROOTDIR` when building.
| 2. an architecture-specific shared system directory specific to the local host, | ||
| e.g. `/usr/local/lib/julia`; | ||
| 3. an architecture-independent shared system directory specific to the local host, | ||
| e.g. `/usr/local/share/julia`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually not sure it's a good idea to look in /usr/local by default. I've kept /usr/local/share/ for backward compatibility, and added /usr/local/lib for consistency. But this doesn't make a lot of sense as the next two dirs (4 and 5) are relative to the julia path so they will correspond to /usr/local/ if Julia was installed there. And if there are two Julia copies, one in /usr and the other in /usr/local, the latter is going to interfere with the former.
|
While I wish otherwise, my current impression is that Julia doesn't care much about Linux norms. If anything, setting the depot to
|
That's not really the case. I've made lots of PRs to ensure Julia can be built and installed to follow the FHS, and so far it was respected. This is a bit different from XDG_CONFIG_HOME, as it doesn't mean the directory will change its location from one system to the next (and users generally don't touch the built-in depot).
/opt is generally organized with one directory per app, precisely to avoid spreading files. Users can already do that (and probably do) by extracting the binary tarball to /opt/julia. |
I'm glad to hear, my interaction has been mainly around XDG and the concerns I've seen put forward in my interactions (scattering is awful, we want to do the same thing on every OS and that's more important than the OS's conventions, working out what goes where is too complicated, etc.) are comments that apply pretty equivalently to FHS and XDG's Base Directories, particularly given the number of direct equivalents:
And when I see Stefan say "The UNIX business of..." I presume he's referring to the FHS.
Right, which is precisely why I suggested it given the "put everything in one place" / "spreading files is awful" comments I've seen in response to suggestions that Julia should respect the XDG Base Directory spec. Anyway, this PR seems sensible and IMO the more considerate Julia can be of the host system's norms the better 🙂. |
|
I think the main difference with XDG is that following the FHS doesn't spread files by default, as you can extract the binary tarball and keep contents in a single place (as opposed to calling |
The FHS specifies that only architecture-independent files should be put under /usr/share (
DATAROOTDIR). Originally we only stored .ji files in the "compiled" directory, but now we also put .so files.Keep /usr/share and /usr/local/share in the default
DEPOT_PATHfor backward compatibility and because they can still be used for architecture-independent files such as environments or registries.Also fix a few uses of
"data"which should have beenDATAROOTDIRand wouldn't work if using a differentDATAROOTDIRwhen building.