Those of us who do software development not only for a living, but also as a hobby, have probably encountered the following scenario:
Say, there is a project at work called
WorkApplication on which you work together with a number of colleagues. And suppose that this application is making use of a library called
SharedLibrary which is under development, meaning that there will be refactoring done on
SharedLibrary, and any such refactoring must cascade to
WorkApplication, so that
WorkApplication always compiles and runs.
Obviously, for this to work, whenever someone opens
WorkApplication in their IDE, they must also open
In Visual Studio parlance, this would make both
SharedLibrary"projects" under the same "solution".
In IntelliJ IDEA parlance they would be "modules" under the same "project".
In Eclipse parlance, they would be "projects" under the same "workspace".
Now, suppose that you also have a home project
HomeApplication that you play with at home, (alone,) in which you also want to use
SharedLibrary. (Suppose that the workplace does not mind if you use
SharedLibrary for your own stuff, just as you don't mind if the workplace benefits from work that you put on
SharedLibrary while working at home.)
Naturally, whenever you refactor
SharedLibrary you want this to cascade not only to
WorkApplication, but also to
HomeApplication. Suppose that you are the only developer responsible for
SharedLibrary, so your colleagues are unlikely to ever modify it, so you do not have to worry about
SharedLibrary ever being refactored by someone who knows nothing about
HomeApplication. What you want to make sure is that whenever you refactor
SharedLibrary, regardless of whether you are doing it in the context of work or hobby, both
HomeApplication will always be updated.
How do you juggle these three entities so as to keep everything updated?
The problem seems to be that different parts of the solution/project/workspace will need to be in different source code repositories:
SharedLibrary need to be in the repository of your workplace, while
HomeApplication needs to be in your home repository.
I am not sure how to mix multiple source code repositories under the same solution/project/workspace. Can it be done? Has anyone tried it? Does it work? What problems are common?
I can imagine scenarios where you forfeit the benefits of version control system operations from within the IDE, and instead you do all your updating/committing using external tools, each time separately for each repository, but can it somehow be done from within the IDE?
I do not want to tie this question to any specific IDE, but let me just mention that the IDE that interests me most is IntelliJ IDEA. (Unfortunately, I find the VCS-related options of IntelliJ IDEA to be very confusing. It seems like I might be able to define multiple VCS servers within the same project, but it is not clear how.)