Be aware that doing this kind of thing in combination with precompilation is
brittle and error prone (precompiled results will not match the actual status
of available packages if that changes). Optional dependencies are better
supported by moving code that depends on both other packages into
Re: Pkg.is_installed(_), Pkg.is_missing(_)
Pkg.has(_)
On Monday, June 27, 2016 at 1:48:41 PM UTC-4, Yichao Yu wrote:
>
> On Mon, Jun 27, 2016 at 1:43 PM, Cameron McBride
> wrote:
> >
> >
> > On Mon, Jun 27, 2016 at 1:02 PM, Yichao Yu > wrote:
>
On Mon, Jun 27, 2016 at 1:43 PM, Cameron McBride
wrote:
>
>
> On Mon, Jun 27, 2016 at 1:02 PM, Yichao Yu wrote:
>>
>> On Jun 27, 2016 12:58 PM, "Tom Breloff" wrote:
>> >
>> > Yichao: is there an alternative "is_installed"
On Mon, Jun 27, 2016 at 1:02 PM, Yichao Yu wrote:
>
> On Jun 27, 2016 12:58 PM, "Tom Breloff" wrote:
> >
> > Yichao: is there an alternative "is_installed" definition that would
check the load path? Lets assume I don't actually want to import it, just
check.
On Jun 27, 2016 12:58 PM, "Tom Breloff" wrote:
>
> Yichao: is there an alternative "is_installed" definition that would
check the load path? Lets assume I don't actually want to import it, just
check.
No.
>
> On Mon, Jun 27, 2016 at 12:48 PM, Yichao Yu
Yichao: is there an alternative "is_installed" definition that would check
the load path? Lets assume I don't actually want to import it, just check.
On Mon, Jun 27, 2016 at 12:48 PM, Yichao Yu wrote:
>
> On Jun 27, 2016 12:20 PM, "Tom Breloff" wrote:
> >
Perfect, that is exactly the kind of thing I was looking for! Thanks, David
From: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On
Behalf Of Yichao Yu
Sent: Monday, June 27, 2016 9:49 AM
To: Julia Users <julia-users@googlegroups.com>
Subject: Re: [julia-users]
On Jun 27, 2016 12:20 PM, "Tom Breloff" wrote:
>
> Here is what I use for this sort of logic:
>
> function is_installed(pkgstr::AbstractString)
> try
> Pkg.installed(pkgstr) === nothing ? false: true
Dont do this since this will miss package in load path. Just eval
Here is what I use for this sort of logic:
function is_installed(pkgstr::AbstractString)
try
Pkg.installed(pkgstr) === nothing ? false: true
catch
false
end
end
On Mon, Jun 27, 2016 at 12:12 PM, David Anthoff
wrote:
> I’m trying to use