Confusion with local packages

Back in the 0.6 days, I used to push! to LOAD_PATH a directory containing all the packages I worked on. After updating to 1.0, I kept using the same strategy, which meant adding all the packages that my packages depended on to the default environment in order to be able to do using MyPkg.

How can I avoid this? I would like to be able to work on my packages without needing to have them in the .julia directory, but still be able to call them with using MyPkg from the default environment, without manually adding all the dependencies.

Is this possible? Is there a better way of doing things?

Yes, just use dev /path/to/package from the Pkg Repl. No need to mess with LOAD_PATH.

Or maybe that is what you mean with not adding them as dependencies?

1 Like

Thanks, that does seem to be doing what I want.

The only disadvantage seems to be that you would need to do this addition manually for all those local packages.

Unfortunately there is a lot of outdated advice on the net that involves LOAD_PATH. I think that we should put a warning about this in its docstring (“this is not something that one would normally touch”).

Even the workflows section (1/b) has some advice about LOAD_PATH manipulation. It is a valid workflow, but I think it would be better if users just did not see any mention of LOAD_PATH for common use cases.