Using + updating packages locals

I’m currently developing a package. At the same time, I’d like to use the package at various different locations on my machine, i.e., in Documents\badData\analyzeBadData.jl, I’d like to be using MyPackage and in Documents\goodData\analyzeGoodData.jl, I’d also like to be using MyPackage. When I make updates to MyPackage, I’d like this to be automatically reflected in both scripts, rather than needing to pull updates to both locations.

From my (perhaps very mistaken) reading of the Package manual suggests that this is not possible. As such, if I want the functionality I’m describing, I really should just make a local directory of scripts and include them every time. Is that correct? Or is there a better way to achieve this, i.e., augmenting the system path to find MyPackage or something like that?

If everything is on a the same filesystem, you can dev MyPackage for both projects.

1 Like

Thanks, but I’m still a little confused how that works. Going into the individual projects and calling dev MyPackage lead to an error about not being able to resolve the package.

However, I looked into Pkg.develop, and provided the local path. Now my project seems to be able to find MyPackage. Do I now also need to call dev MyPackage for each project to continue to track updates?

It is unclear what you mean here. pkg> activate?

Use the full path on the filesystem, eg

pkg> dev path/to/MyPackage
1 Like