I’ve reached the point in my Julia journey where I’m seeing the limitations of include for assembling lots of modules into a project. It seems https://github.com/JuliaLang/julia/issues/4600 is the answer, but progress seems slow. Fortunately, @StefanKarpinski claims that it “shouldn’t be that difficult” and tags “help wanted”.
I want to help. I’m willing to put a few dozen hours into this feature during the next few weeks.
But how “not that difficult” is this issue? I’ve never worked on a project as large as Julia, and I can read some C, but have never written much of it? Can I help?
I think the most important contribution of implementing #4600 for this would be standardizing the file paths for files that define modules, since you can’t use the relative import without include call unless the paths match the module names. Aside from that, it doesn’t really make much of a practical difference—it’s literally just about saving you from typing that include line. I guess there’s cases where you might avoid having to think about which code that uses a relative submodule should include it (the first user), which is nice too.
I ended up solving the problem that was motivating me to work on this issue by modifying the LOAD_PATH. Now that I know includes are not the only way to organize a project, things aren’t nearly as bad as they seemed.
I added my project’s src directory to the LOAD_PATH, and then renamed some source files to match the name of their module. I think what I have now is called a “package directory”?
You talked about “standardizing the file paths for files that define modules”. Isn’t this what package directories do already? As far as I understand, #4600 would give me nothing that package directories do not already give me, except maybe relative imports could work without having to modify the LOAD_PATH?