-
-
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
RFC: add .../share/julia/site/v0.1 to default LOAD_PATH #2550
Conversation
Looks reasonable to me. @ViralBShah, @JeffBezanson? |
Looks good to me. |
(The Travis failure looks unrelated, some Travis breakage causing a problem building LAPACK?) |
|
Those both seem like sane suggestions to me. |
@nolta, these suggestions seem reasonable to me. (I had initially proposed including the minor version as well.) Note that Python sometimes breaks backwards compatibility between minor versions (I haven't checked with Ruby). |
Here's what I did on function dir()
b = abspath(get(ENV,"JULIA_PKGDIR",joinpath(ENV["HOME"],DIR_NAME)))
x, y = VERSION.major, VERSION.minor
d = joinpath(b,"v$x.$y")
isdir(d) && return d
d = joinpath(b,"v$x")
isdir(d) && return d
return b
end The presumption is that one would only use one or the other, but that would leave it up to the OS package system. |
I can certainly add both to the path. In the longer term, however, there is the question of whether Julia itself should install the files that come with it into My inclination is to pick one or the other rather than to have both. I can't imagine a reasonable circumstance in which having both in the path would be of much use, and it has the drawback of causing confusion about where things should be installed. @StefanKarpinski's original argument was that, if you stick with semantic versioning religiously, you won't have backward-compatibility issues between minor versions (except for 0.x), unlike Python. In this case, having only the major version in the path name makes it easier to share packages between minor versions of Julia installed on the same machine. On the other hand, minor versions still won't be forward-compatible, so you still might want multiple versions of software installed to work with different minor versions of Julia. My inclination is towards the latter argument --- only bugfix releases leave the API unchanged (modulo bugs), so only bugfix releases will share packages forwards and backwards, hence MAJOR.MINOR should be in the path. At worst, it means that users with multiple versions of Julia installed on the same machine might need to install some external packages multiple times (or change the |
I have been thinking about this and feel that MAJOR.MINOR is safer to go with. |
Note that the patch has been updated to use |
Should |
It's not strictly necessary for These should be documented in the manual somewhere too. |
More nitpicks:
(sorry, the smallest commits often draw the most complaints ;) |
@nolta, regarding your second comment, I think it is clearer and more conventional (and simplifies life for makefiles that want to install into these directories) to look in the same relative paths under Regarding your first comment, if a user installs Julia into, say, (The stuff that Julia currently installs into |
Any further thoughts on this? |
Let's merge this. Quite satisfactory for now. |
RFC: add .../share/julia/site/v0.1 to default LOAD_PATH
Yet another attempt at a patch to fix the first two bullet points in #2295 (replacing the patch in #2296, which had rebase problems).
Update: use
site
instead oflib
, and include minor version number in path.