On Thursday, October 1, 2015 at 8:21:34 PM UTC+2, Steven G. Johnson wrote:
>
>
> On Thursday, October 1, 2015 at 4:36:07 AM UTC-4, Andreas Lobinger wrote:
>>
>> but afaics there is no replacement of require (in using or import) that
>> enables this - importing from a string. Any good ideas?
>>
>
> Just unconditionally import the module, and add it to your REQUIRE list.
>
> Conditionally importing is a problem for precompilation (see e.g. the
> discussion at
> https://github.com/JuliaLang/JSON.jl/commit/fe9de2d226619ea52510479bc30b9acaad77628d
> )
>
Well, it was not my idea (this is from Compose/Gadfly) but i somehow
understand that for some optional features of a package some optional
imports might be helpful. Especially in the area of BinDeps (or other
binary import) dependencies as they might be -depending on your platform-
hard to build.
But i wonder, if precompilation is locally (not centrally), what is the
problem. The set of packages is available/not-available at the point of
compilation. Maybe it could be marked in Require what is imported and what
imported conditionally.