Issue filed: https://github.com/JuliaLang/julia/issues/12545

On Monday, August 10, 2015 at 2:18:25 PM UTC-7, Seth wrote:
>
> Sorry to follow up, but I've confirmed this is the case (it was also in 
> the original announcement; sorry for overlooking it).
>
> In any case - during this testing phase, would it be possible to make 
> __precompile__() work only for packages that have explicitly opted in, so 
> that dependencies that cannot be precompiled don't suddenly start causing 
> failure of the top-level package? I'd love to have precompilation for 
> LightGraphs, but I don't really want to have to depend on the 
> precompile-safeness of the dependencies to maintain a passing build status 
> for LightGraphs.
>
> On Monday, August 10, 2015 at 2:03:54 PM UTC-7, Seth wrote:
>>
>> Hi,
>>
>> I'm running into a weird problem that I think is related to 
>> precompilation. It seems that __precompile__() will attempt to precompile 
>> all dependencies as well (that is, if you're "using Foo", Foo will get 
>> precompiled). 
>>
>> Is this true? In my case, it appears that the precompilation in 
>> LightGraphs causes a failure due to "ERROR: LoadError: LoadError: 
>> UndefRefError: access to undefined reference" in LightXML, which may not be 
>> precompile-safe.
>>
>> Thanks for any advice.
>>
>>
>> On Thursday, August 6, 2015 at 9:39:23 PM UTC-7, Steven G. Johnson wrote:
>>>
>>> Many of you are aware that Julia 0.4 has some facilities for 
>>> precompiling modules, but in the last couple of days they have become 
>>> significantly more automated, which should make much faster load times 
>>> accessible to all your users in 0.4.
>>>
>>> If your module (and any modules it imports) are safe to precompile, then 
>>> just add:
>>>
>>> VERSION >= v"0.4.0-dev+6521" && __precompile__()
>>>
>>> at the top of your module file (*before* module ... end), and it will 
>>> be automatically precompiled (to a cached ".ji" file in ~/.julia/lib) the 
>>> first time it is imported.  Thereafter, if any of the dependencies (e.g. 
>>> the included files or imported modules) are updated, it will automatically 
>>> be recompiled the next time it is imported.
>>>
>>> See the Julia manual section on modules and precompilation 
>>> <http://docs.julialang.org/en/latest/manual/modules/#module-initialization-and-precompilation>to
>>>  
>>> find out how to make your module safe for precompiling.
>>>
>>> (If your module is *not* safe for precompiling yet and you don't have 
>>> time to fix it, use __precompile__(false) to prevent your module from 
>>> being accidentally precompiled, e.g. by being imported into another module 
>>> that is precompiled.)
>>>
>>> --SGJ
>>>
>>

Reply via email to