This topic has been asked many times. I have read many posts. Much of the information is incomplete or contradictory. I have read the package manual. It uses the word “project” in 2 very different senses. So, let’s not use that word–it is more of an informal notion. The manual also focuses on packages that are in a git repo. I use git locally for version management. I keep a sort of backup on github, but I am not systematic about dev vs. master branches. I realize that to publish the package in the Julia package directory I’d have to clear that up with discipline.
I just want to be able to do : using mything
and have this work with Revise while I am still developing and testing the work.
It is a module in a Julia source file in a directory with other source files and some essential external files for loading essential parameters. The module and the julia source file have the same name (though the file has the .jl extension of course). It seems this is necessary; others say it is not. Confusing.
The module has using for 8 packages. The module has includes for 6 source files. The 6 source files are, naturally in the same directory with the source file containing the module definition.
This works: push!(LOAD_PATH, "/Users/lewis/.julia-local-packages/Covid")
in my startup.jl file. Note that the directory is called Covid and the module is called CovidSim and the source file is called CovidSim.jl. It is symlinked from the directory where I work on it (this is what I and most IDEs would call a project–a place where all the stuff is, with or without extra metadata describing/defining the stuff).
I was told I could just do:
] dev <directory containing the source file for the module>
This, of course, doesn’t work. It is missing steps like generate and activate. I see that I could do add, which might work. But, Revise says that I mustn’t do that because Revise will not see changes to the package in that case. And I want Revise to work. The problem is that I have a module and some source files. I do not have a package.
First, then is to create a package with a Manifest.TOML file, a source directory, all in some special place. While I am still developing the “package” it would be inconvenient if I need to copy to that special place. If it is special (like in a specific place with a specific name like “source” that’s easy: I’ll just symlink it.
It is fine if the answer is just stick to pushing to LOAD_PATH. That has zero overhead and does everything I want.
When it is time to really make a package (if ever), then I’ll build it by hand carefully following the manual. I understand and accept that much of the package overhead is there for good reasons: enabling widespread distribution of packages RELIABLY and securely; providing dependency management; and providing users with super simple access to packages and management of packages (add, rm, up, etc.). All of this works really well; has enabled bootstrapping a large Julia ecosystem quickly; and has avoided lots of headaches that other language ecosystems have had. I just need a little workflow clarification.