Within IJulia, Autoreload.jl will automatically reload any changed files 
that were "require"ed  before a cell is executed.

That isn't possible in the normal Julia REPL at the moment, but I have a 
proposal out (https://github.com/JuliaLang/julia/issues/6445) that would 
enable it. 

On Wednesday, October 21, 2015 at 4:29:51 PM UTC-4, Christian Peel wrote:
>
> Cedric,
> I have also noticed the same difficulty with the workflow; this is my 
> largest challenge with Julia.  I am aware of Autoreload.jl, but haven't 
> tried it out much yet.  It's good to know that Juno and the atom client are 
> available as well.
>
> My preference is that during development at the REPL, for  the REPL 
> (and/or compiler?) to be smart enough to notice that any file (that has 
> been 'included') has changed and to automatically recompile it and any 
> dependent code.  Here's my guess as to what the process would be
>
> > include("myfun.jl")
> > fun(1,2)    # fun is defined for integer inputs in myfun.jl
> # make some changes to fun.jl
> > fun(1,2)
> # REPL checks list of files which contain code that 'fun(1,2)' depends on,
> # and parses and compiles any that have changed. I.e., it automatically
> # includes myfun.jl, and recompiles.  So the REPL has to keep a mapping
> # in memory between the contents of a file and the file, so that it only 
> # includes needed files.
>
> Does anyone have an idea as to whether this is possible? 
>
>
> On Wed, Oct 21, 2015 at 9:05 AM, Jonathan Malmaud <mal...@gmail.com 
> <javascript:>> wrote:
>
>> Hi, I'm the author of Autoreload. 
>> I stopped maintaining it since I now use the great Atom Julia plugin (
>> https://github.com/JunoLab/atom-julia-client, built by Mike Innes, who 
>> participates in this forum). Its workflow is described in 
>> https://github.com/JunoLab/atom-julia-client/blob/master/docs/workflow.md
>> . 
>>
>> That said, please file an issue on 
>> https://github.com/malmaud/Autoreload.jl to prod me to get it functional 
>> again. 
>>
>>
>> On Wednesday, October 21, 2015 at 11:24:50 AM UTC-4, Cedric St-Jean wrote:
>>>
>>> I'm struggling to get a good workflow going in 0.4. The docs 
>>> <http://docs.julialang.org/en/release-0.4/manual/modules/> tell me what 
>>> I can do, but not so much what I should. How does everybody work? What does 
>>> your "startup code" look like? In particular:
>>>
>>> 1. Should I `push!(LOAD_PATH, ".")`, or should I include every file 
>>> manually? I don't know why this behavior was removed in 0.4...
>>>
>>> 2. Inside my modules, should I `include("blah.jl")` then `using blah`?
>>>
>>> 3. How does everyone reload modules when working interactively? Do you 
>>> have a big block that goes
>>> workspace()
>>> reload("Blag")
>>> using LastMain.Other_Module
>>> and you just run it every time you change something in Blag? I don't 
>>> understand workspace()'s purpose. Wiping all variables (even if saved 
>>> elsewhere) is awfully drastic for interactive work.
>>>
>>> 4. Has anybody succeeded in getting Autoreload.jl to work? If I 
>>> `arequire("Blag")` I get warnings that require is deprecated, and it 
>>> sorta-kinda works, but if I add dependencies `arequire("Blag", 
>>> depends_on=["OtherModule"])` then it seems to get in a bad state where 
>>> nothing gets reloaded at all.
>>>
>>> Thank you,
>>>
>>> Cédric
>>>
>>
>
>
> -- 
> chris...@ieee.org <javascript:>
>

Reply via email to