On Fri, Oct 30, 2015 at 12:26 PM, Tom Breloff <[email protected]> wrote:
> Huh... that's something I didn't know.  What's the environment variable?  Is
> that documented?

It is documented here[1]. It is a little hard to find .... (I didn't
remember that it was and figured out by checking the pkg.jl test in
base julia.....). Suggestions or PR about how to make it more
discoverable are welcome.

[1] http://julia.readthedocs.org/en/latest/stdlib/pkg/?highlight=julia_pkgdir

>
> On Fri, Oct 30, 2015 at 12:24 PM, Yichao Yu <[email protected]> wrote:
>>
>> On Fri, Oct 30, 2015 at 12:13 PM, Tom Breloff <[email protected]> wrote:
>> > In this case, Plots doesn't actually depend on Gadfly at all... it's an
>> > optional dependency.  (I only added it to the require to test what might
>> > happen)  However in the general case it's really tricky if the only
>> > "real"
>> > solution is "fix the package so the restriction isn't necessary".
>> >
>> > What if a user installs a package that requires an old version of
>> > StatsBase
>> > (say, before some change to the interface).  Then if the user has 10
>> > other
>> > packages which all expect a more recent version of StatsBase, they will
>> > all
>> > break (or Pkg will generate an error if any of the version dependencies
>> > in
>> > REQUIRE were properly written).  The user may never use those packages
>> > in
>> > the same julia session, but because the package states are shared among
>> > all
>> > 0.4 versions of Julia (there's only one ~/.julia/v0.4 directory), he/she
>> > cannot keep that package installed.  There's got to be a better
>> > solution.
>>
>> You can change this directory with environment variable
>>
>> >
>> > Of course, a better error message would be helpful too.
>> >
>> > On Fri, Oct 30, 2015 at 11:50 AM, Yichao Yu <[email protected]> wrote:
>> >>
>> >> On Fri, Oct 30, 2015 at 11:30 AM, Tom Breloff <[email protected]> wrote:
>> >> > Ok, I tried that out, and you're right that I get an error (it didn't
>> >> > fallback to an older version, unless maybe that would happen with
>> >> > Pkg.update()?)
>> >> >
>> >> >
>> >> > julia> Pkg.resolve()
>> >> > ERROR: unsatisfiable package requirements detected: no feasible
>> >> > version
>> >> > could be found for package: Gadfly
>> >> >  in error at ./error.jl:21
>> >> >  in resolve at ./pkg/resolve.jl:37
>> >> >  in resolve at ./pkg/entry.jl:422
>> >> >  in resolve at pkg/entry.jl:404
>> >> >  in anonymous at pkg/dir.jl:31
>> >> >  in cd at file.jl:22
>> >> >  in cd at pkg/dir.jl:31
>> >> >  in resolve at pkg.jl:46
>> >> >
>> >> > julia>
>> >> > [tom@tomoffice Plots]$ cat REQUIRE
>> >> > julia 0.3
>> >> >
>> >> > Colors
>> >> > Reexport
>> >> > Compat
>> >> > Gadfly 0.3.18
>> >> >
>> >> > How should I go about rectifying this error?  In this case I know
>> >> > that
>> >> > the
>> >> > requirement clash is with Immerse (which has "Gadfly 0.3.16 0.3.17"
>> >> > in
>> >> > its
>> >> > require file), but if a user sees this error they would likely be
>> >> > lost.
>> >> > I
>> >> > fear that there's not a good solution once a single package has
>> >> > special
>> >> > requirements.
>> >> >
>> >>
>> >> We could probably print out the actual conflicting requirements and
>> >> where they are coming from. This should help the user to know where to
>> >> look (or which package to blame)
>> >>
>> >> IMHO, for this particular conflict, the best solution would be to fix
>> >> Immerse to work with newer version of Gadfly. Or if you need it now,
>> >> maybe try to pin Plots down to an earlier version that doesn't require
>> >> Gadfly 0.3.18 (if it has one of course).
>> >>
>> >> >
>> >> > On Friday, October 30, 2015 at 11:15:52 AM UTC-4, Yichao Yu wrote:
>> >> >>
>> >> >> On Fri, Oct 30, 2015 at 11:14 AM, Yichao Yu <[email protected]>
>> >> >> wrote:
>> >> >> > On Fri, Oct 30, 2015 at 11:05 AM, Tom Breloff <[email protected]>
>> >> >> > wrote:
>> >> >> >> Thanks... after reading through that again, let me adjust my
>> >> >> >> scenario:
>> >> >> >>
>> >> >> >> Package A's require:
>> >> >> >>
>> >> >> >> julia 0.4
>> >> >> >> C 0.1 0.2-
>> >> >> >>
>> >> >> >> Package B's require:
>> >> >> >>
>> >> >> >> julia 0.4
>> >> >> >> C 0.3
>> >> >> >>
>> >> >> >> What version of C is installed?  Package A want any version
>> >> >> >> 0.1.x,
>> >> >> >> Package B
>> >> >> >> wants any version 0.3.x or greater.  Who "wins"?
>> >> >>
>> >> >> Or fallback to an older version of one of them that don't conflict.
>> >> >>
>> >> >> >
>> >> >> > I'd be surprised if you don't get an error.
>> >> >> >
>> >> >> >>
>> >> >> >> On Fri, Oct 30, 2015 at 10:28 AM, Yichao Yu <[email protected]>
>> >> >> >> wrote:
>> >> >> >>>
>> >> >> >>> On Fri, Oct 30, 2015 at 10:18 AM, Tom Breloff <[email protected]>
>> >> >> >>> wrote:
>> >> >> >>> > I'm very confused about how Pkg resolution works in 0.4, and I
>> >> >> >>> > couldn't
>> >> >> >>> > find
>> >> >> >>> > a definitive source of details.  If package A has the REQUIRE
>> >> >> >>> > file:
>> >> >> >>> >
>> >> >> >>> > julia 0.4
>> >> >> >>> > C 0.1
>> >> >> >>> >
>> >> >> >>>
>> >> >> >>> This means version 0.1 or higher for C
>> >> >> >>>
>> >> >> >>> >
>> >> >> >>> > and package B has the REQUIRE file:
>> >> >> >>> >
>> >> >> >>> > julia 0.4
>> >> >> >>> > C 0.2
>> >> >> >>> >
>> >> >> >>>
>> >> >> >>> This means version 0.2 or higher for C
>> >> >> >>>
>> >> >> >>> >
>> >> >> >>> > which version of C is installed?  Does it change if you do a
>> >> >> >>> > Pkg.add("C")?
>> >> >> >>> > What determines which package "wins"?
>> >> >> >>>
>> >> >> >>> The latest available that is compatible with everything else.
>> >> >> >>>
>> >> >> >>> Note to specify the upper bound, use `C lower_version
>> >> >> >>> upper_version`
>> >> >> >>>
>> >> >> >>> >
>> >> >> >>> > Bonus question: can someone point me to documentation on
>> >> >> >>> > exactly
>> >> >> >>> > what
>> >> >> >>> > the
>> >> >> >>> > plus/minus mean?  What's the difference between `0.1`, `0.1-`,
>> >> >> >>> > and
>> >> >> >>> > `0.1+`?
>> >> >> >>>
>> >> >> >>> - and + are for prerelease and build
>> >> >> >>>
>> >> >> >>> ```
>> >> >> >>> julia> v"0.1-2+3".prerelease
>> >> >> >>> (2,)
>> >> >> >>>
>> >> >> >>> julia> v"0.1-2+3".build
>> >> >> >>> (3,)
>> >> >> >>> ```
>> >> >> >>>
>> >> >> >>> >
>> >> >> >>> > Bonus question: how does the logic change with the new package
>> >> >> >>> > manager?
>> >> >> >>> > (if
>> >> >> >>> > at all)
>> >> >> >>>
>> >> >> >>> nothing
>> >> >> >>>
>> >> >> >>> >
>> >> >> >>> > Bonus question: is there an open issue/PR that discusses
>> >> >> >>> > potential
>> >> >> >>> > future
>> >> >> >>> > changes to METADATA and package management?
>> >> >> >>> >
>> >> >> >>> > Thanks!
>> >> >> >>>
>> >> >> >>> Ref
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> http://julia.readthedocs.org/en/latest/manual/packages/#require-speaks-for-itself
>> >> >> >>
>> >> >> >>
>> >
>> >
>
>

Reply via email to