Hello,
I have a package I am developing locally. I created the package using ] generate
and have added it to a local registry so that I may share it easily with collaborators. Both the package and the local registry have their own git repos.
Separately, I have a development environment that I use (created via ] activate MyEnvironment
). I added my local registry to the environment and then added my package via ] add MyPackage
.
Now I want to be able to run code like this in a script file (starting in my specific environment is already taken care of via julia.environmentPath
in VsCode)
using MyPackage, Revise
testing = MyType(...)
testresult = MyFunction(testing)
while at the same time making changes to my package, so I can see the impact in real time (via Revise
). But it does not appear to be working. For example I defined a new function in MyPackage
and added it to the export list and I get an error that the new function is not defined. But if I do instead
include("Path/To/MyPackage.jl")
using .MyPackage, Revise
testing = MyType(...)
testresult = MyFunction(testing)
testresult2 = MyNewFunction(testing) # newly exported function
Well now each time I restart the script the change is reflected but Revise does not appear to track changes anymore.
Am I going about this the wrong way? I’m sure there is a better way and would appreciate any advice.