Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Deal with packages for Julia 0.1.2 and 0.2.0 in the same system #264

Closed
diegozea opened this issue May 27, 2013 · 13 comments
Closed

Deal with packages for Julia 0.1.2 and 0.2.0 in the same system #264

diegozea opened this issue May 27, 2013 · 13 comments

Comments

@diegozea
Copy link
Contributor

Actually, Julia 0.1.2 finds .julia directory of Julia 0.2.0
So, packages doesn't work fine in one of the installations.

@ViralBShah
Copy link
Member

@StefanKarpinski Do we need .julia/v0.2/ and such, so that packages of multiple julia versions can co-exist?

@kmsquire
Copy link
Member

@ViralBShah, Pkg already handles .julia/v0.2, etc., although those directories are not created by default. If a user creates them however, they will be used (and that is a solution/workaround to this problem).

#3344 creates them by default, although @StefanKarpinski is reluctant to do that.

With the workaround, this issue could be closed, although if #3344 is not applied, perhaps it should be changed to document the fact that Pkg can use .julia/v0.2, etc., if (and only if) the user creates them.

@StefanKarpinski
Copy link
Sponsor Member

I think the current situation is fine. If you create ~/.julia/v0.1 and ~/.julia/v0.2 then you get separate Julia packages that work with the different versions. Most people will not want multiple julia versions.

@diegozea
Copy link
Contributor Author

Thanks for that tip! I going to try it later.
Since is useful information for people who want to maintain packages for different Julia versions... Maybe can be documented in the contribution section of the manual and/or in METADATA ?

@kmsquire
Copy link
Member

Actually, in order for this to work currently, you need set JULIA_PKGDIR (either at the prompt or from within julia):

julia> ENV["JULIA_PKGDIR"] = "~/.julia/v0.2"
"~/.julia/v0.2"

julia> Pkg.init()

If the directory already exists, Pkg.init() complains

@kmsquire
Copy link
Member

Update: that should be

julia> ENV["JULIA_PKGDIR"] = ".julia/v0.2"
".julia/v0.2"

julia> Pkg.init()

@ViralBShah
Copy link
Member

Cc: @pao @staticfloat

@kmsquire
Copy link
Member

JuliaLang/julia#3351, when applied, will allow an empty ~/.julia/v0.2 subdirectory to be created by hand and used as the default package dir.

@aviks
Copy link
Member

aviks commented Dec 30, 2013

Give JuliaLang/julia#3351 has been merged, can this issue be closed?

@kmsquire
Copy link
Member

I don't think so. The default is still to put all packages together, and
there's no easy migration to versioned package directories unless you
delete .julia and create them by hand. So while it's possible, I believe
it's undocumented, and not user friendly.

The title could be updated to indicate the current status, though, and
perhaps use v0.2 and v0.3, since the same issue exists there.

On Mon, Dec 30, 2013 at 9:11 AM, Avik Sengupta notifications@git.luolix.topwrote:

Give JuliaLang/julia#3351 https://github.com/JuliaLang/julia/pull/3351has been merged, can this issue be closed?


Reply to this email directly or view it on GitHubhttps://github.com//issues/264#issuecomment-31356124
.

@IainNZ
Copy link
Member

IainNZ commented Feb 4, 2014

This is handled now, right?

@kmsquire
Copy link
Member

kmsquire commented Feb 4, 2014

The change to create versioned packages by default still needs to be
backported to v0.2.

On Tuesday, February 4, 2014, Iain Dunning notifications@github.com wrote:

This is handled now, right?


Reply to this email directly or view it on GitHubhttps://github.com//issues/264#issuecomment-34068623
.

@kmsquire
Copy link
Member

Okay, now it's handled. v0.2.1 now creates a versioned package dir by default, and @staticfloat will be creating a new v0.2.1 download when the v0.3 fires die down. ;-o

Cheers!

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

No branches or pull requests

6 participants