Make a project to be a module by default #397
Labels
documentation
Explaining how things work!
enhancement
New feature or request
project-setup
Related to the functionality "Project setup"
Is your feature request related to a problem? Please describe.
I think the root problem is the fact that Revise.jl does not track files that are included in a file that is itself called using includet.
This causes some annoyances when I have a file script.jl file in my script folder and I want to call source code from files in src/.
When I work on a script, I like to include it with includet which allows me to modify the file without reloading it. But then my included files in src/ are not visible. After every modification of the files in src/, you have to restart the REPL which is very annoying. This problem was also described by a user on discourse in this post .
Describe the solution you'd like
The solution I use is the make the project a module as is described in the manual here.
This solves all the mentioned issues. It is now possible to add 'using MyProject' in my script files and calling the functions. Revise.jl works perfectly since MyProject is a legal julia project and can hence be loaded.
The feature I would love to have is that when a project is created, the module would be automatically created. Granted, this is a very small step to perform by hand, but currently the module solution lacks discoverability since:
My feature request is hence to make the module by default and advertise this workflow more prominently.
It is not clear for me whether this is breaking or not. I guess for people who don't use the module approach, everything should just work the same. But I do understand that this could be slightly disruptive.
Describe alternatives you've considered
As an alternative, maybe a modification of the documentation would be sufficient to reflect better the advantages of the module approach.
Thanks,
Olivier
The text was updated successfully, but these errors were encountered: