-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a project to be a module by default #397
Comments
This has it's own disadvantages though. Firstly, it is a breaking change (and hence we can't do it as a default). However, for me there is another reason to (sometimes) prefer the non-module approach: re-compilation. At least in my cases, where I constantly change parts of the What I would advocate, if you want to put in the time, is to make a Pull request that does two things:
|
Thanks a lot for your quick feedback.
That's indeed a strong argument against :-)
Aha, I hadn't thought of that. That would be very annoying indeed.
Great suggestions. I will give it a try since it would be my first pull request ever. Thanks again! |
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: