I've been thinking on how to import a project B into a project A, which both are GitHub repositories.
Project B is a library I reuse over many projects, I do add stuff in it, directly from project X, Y or Z.
Project B is simple, it's a directory with C# files and an assembly definition, i.e. a Unity class library. It's like a Shared Project in Visual Studio in the sense that it is minimalist and self-contained.
I've been trying to look for alternatives such as git submodules and so on, but in the end, nothing beats the ease and flexibility of deploying that library to another project through a symbolic link.
- not getting a pre-built library (and impossible to augment, obviously)
- code can be changed directly
- IDE sees no difference, these are just files even though they're somewhere else
- I do not have to mix commits in the library with those of the project
- I have to commit library to its repository
- Some stuff can get broken if I do API changes
But in reality when I look at these cons, I don't think it outweighs the pros and these would happen even when trying a different approach.
This is how I set things up:
- dev folder
- library symlink
I use Link Shell Extension which eases the creation of symlinks in Windows Explorer.
Is it a good approach for being able to import external code in a project yet being able to modify it ?
Else, could you suggest some alternatives ?