The title is my question. I am always testing my package by using MyPackage now according to documentation my LOAD_PATH is checked after Pkg.dir() is checked, where my old version of MyPackage is. I want a stable version of MyPacke in Pkg.dir() for testing and comparisons. Now whenever I want to test a change to MyPackage I will have to commit my changes, push it to some repo and then pull it again inside Pkg.dir() */MyPackage ( if I feel like wasting even more time I would use Pkg.update("MyPackage") ). I also spam the repo with useless commit messages basically being âdebugâ.
Now this does not seem like a sane development process to me, what am I doing wrong?
I had problems to follow, what you actually try to do, but my recommendation would be:
learn git (especially about branching)
work for development with a local repository only.
Youâll need local git access (commandline or GUI) and put your stable version into a branch âstableâ, and Pkg.checkout should enable you to select this branch.
The remote (any remote) repository you only need to share code. git works locally also.
I typically develop in the same directory where I also keep the stable version, using âgit checkoutâ to switch between development and stable branches. But this only works because I never need the stable version at the same time as I am working on a development branch. (In that case I guess setting the JULIA_PKGDIR environment variable would be the way to go.)
For tests that take a while to run, or that need a different OS or hardware, Iâve sometimes used git hooks. That way I can push commits to a server and it will run the tests automatically. This leads to lots of âdebugâ commits, but it is possible to âsquashâ them, to make the commit history look better.
I typically create a local package with Pkg.generate, and work from there. If it is production code, I work in branches, but otherwise on the master. I only commit changes to keep track of it, and do not necessarily push/pull unless I have a repo on Github.
Learning git is quite useful. Some editors have git integration (eg Emacs), which makes working with version control really seamless.