-
Notifications
You must be signed in to change notification settings - Fork 86
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
Preferred way to develop source #62
Comments
You can dev any project with a Project.toml that has a name, UUID, and src/ProjectName.jl. That will play well with Revise AFAIK - it just informs Julia that the package will change. |
Okay, but following the default setup from the DrWatson docs my |
Further, if I get a |
Switch to the global env and then dev it? Should work then. |
Switch to the global env, dev it, then switch back? Or are you proposing I work inside the global env which would defeat the whole purpose of working in a project, no? |
And that doesn't address that I already have a patch (which is to push the The main consideration is that this should be easily reproducible. That I should be able to just hand this repo to someone else and have it work. That definitely won't be easy if there needs to be messing with |
Hi @jessebett , thanks for opening this. I will now address your questions, and I hope I can resolve your confusions. Before that though, I need to stress the following point:
As you have already mentioned:
That is correct and is on purpose. The This is how I do it, and how I suggest you do it: Above, What you will see is that inside my project's
That is it. If this solves your concerns please let me know and I will put it into DrWatson's documentation as is. |
@jessebett can you please tell me if this was okay for you? |
Hi @Datseris. Yes, you are correct that my issue was conflating packages and projects. I've compartmentalized the package into its own sub-directory as you've suggested and it works for me. I agree that this could be worth highlighting in the docs. |
Thanks, will do so soon! :) |
Might also be worth using git submodules? Could be too much hassle though... |
@Datseris could you give an example for how you set up your
src
for a project.I had some trouble following the REPL-Based Workflow. In which I created a module file in
src
which includes other source files. Then in a script I wouldinclude(srcdir()*"module.jl")
andusing .ModuleName
which worked fine. However, developing wasn't great because changes to the source files or module would not be updated by Revise, and reloading them got conflict warnings.Instead I'm currently pushing the
src
directory to myLOAD_PATH
and using the module in a usual way. This works well with Revise, but isn't really nice.You mentioned that a better solution would be to
]dev
? Is this in thesrc
directory or the entire project directory? I probably misunderstand what]dev
does, but I thought it needed to be a package (though I'm not sure what that entails).The text was updated successfully, but these errors were encountered: