Revise with Requires?

question

#1

Is there a way of getting Revise working on files included with Requires? My experience is files included in a @require block don’t get updated with Revise.


#2

If you can put together a simple demo that I can copy/paste and reproduce the issue, there’s a chance this is fixable.


#3

Seeing this involves file loading I made a test package. Load with this script:

]dev https://github.com/rafaqz/ReviseTest.jl
using Revise
using ReviseTest
using Images # trigger the @require block

julia> testfunc()
1

# Then change the output of testfunc() in  YOURDEVFOLDER/ReviseTest/src/testfile.jl
julia> testfunc()
1

# It should still return 1...

#4

There’s a potential solution here. Comments, testing, and/or help figuring out why it doesn’t work on Windows would be appreciated.


#5

Thanks! That works perfectly on linux. Sorry I can’t test on windows.

The only issue is @require blocks are getting awfully long, and not really DRY. It would be great if Requires could notify Revise automatically of new files, but I understand the performance issue is probably more important.