I’ve been using Julia for a while and developed the habit of setting
LOAD_PATH in the Julia start-up file so that I have a directory structure like:
~/julia/dev-0.4/*packages* ~/julia/dev-0.5/*packages* ~/julia/dev-0.6/*packages* ~/julia/dev-0.7/*packages* ... ~/julia/dev-1.2/*packages*
As Julia 1.0 was released and then Pkg was introduced I’m starting to realise this is sub-optimal. I’ve looked at using Pkg to help organise my packages with using semver and compat but I’m not sure how to organise my packages. For example, if I didn’t use
LOAD_PATH but used environments for each package with exporting
JULIA_PROJECT=@. and then simply did
] add /path/to/dependency or
dev --local it, then:
- Could I have my packages in random locations, spread through the directory structure and just reference them with an absolute file path to
add? That would be helpful as often packages are a script or two for some other project and I don’t want to put all my Julia packages in a single dir.
- Or should I do all my development in
- If I
deva dependent package in order to make changes in the dependent package while I’m also making changes to the current package then will packages that depend on the current package break (eg. not use the stable “released” versions)?
- Perhaps I need to publish my changes to a local Julia registry but that seems to be overkill for one local user. Or maybe people use a “production” and “development” environment instead of one environment per package.
- I often use
Revisein the REPL but then I must add it as a dependency to the environment
add Revisebut I don’t want
Revisebeing an actual dependency. How should “development only” dependencies be handled?
Basically I want to have a methodology that will not break existing packages that depend on the one I’m modifying and use the powerful version resolver to figure out what packages to use.
Thanks for the tips!