I did something and I am not sure how to fix it.
I started working on a project/package and build a module. I think I activated the package and now the following happened. If I go to the REPL adding my package loads an older version of it. How do I change that.
Thank you in advance!
You may find Revise.jl to be helpful! It automatically reloads code when it is edited.
Yes I use that. But this was a larger project and I am unsure what went wrong. In the reply I can
using myPackage but is an old version and I am trying to change that.
It sounds like you might have done
Pkg.add of your local package when you should have done
Pkg.develop. The former makes a snapshot of the package whereas the latter uses what is currently there.
Thank you! How do I correct that?
Pkg.develop of your package. If that doesn’t work you’ll need to provide a more precise description of your setup.
I cannot thank you enough. I tought I was going crazy.
Take a look at this blog post to learn more about environments. Use
Pkg.status to check the installed packages in your current environment,
and make sure to remove the version you
Pkg.added before doing
Pkg.develop on it.
added version will show a git branch name at the end:
(@Code2021) pkg> st
[41458dd0] KD232 v0.1.0 `\\Path\to\package\KD232#master`
[0ccbab1c] KM620 v0.1.0 `\\Path\to\package\KM620#master`
deved version will show just the path:
(@Code2021Dev) pkg> status
[41458dd0] KD232 v0.1.0 `\\Path\to\package\KD232`
[0ccbab1c] KM620 v0.1.0 `\\Path\to\package\KM620`
Why? As far as I know
Pkg.develop will simply replace what you previously
yes. I tried only
develop and it worked. So I assume it got replaced.