28766, "jabraham17", "Mason needs to support local MASON_HOME", "2026-05-01T23:31:30Z"
Today, all dependencies (both registry and git) are cloned into the global MASON_HOME. For registry dependencies, this is fine. But for git dependencies, this can cause an issue.
For example, Project A adds the git dependency MyRemoteRepo/MyDep, depending on the main branch. Project B adds the git dependency MyOtherRemoteRepo/MyDep, depending on the main branch. Mason will try and store both of these dependencies under the directory $MASON_HOME/git/MyDep-main. Assuming these are different dependencies with different git histories, this will fail.
We could maintain a map of git remotes to dependencies that is more robust than just the dependency name, but I think the truly most robust thing to do is to create a second MASON_HOME that is local to the project. That way, a single mason project can't pollute the global MASON_HOME with dependencies only it will ever use.
I would suggest we use .mason inside of the mason project for this purpose, and clone git dependencies under here. This could also serve as a build cache for things like prereqs or some sort of implementation of incremental compilation.
Other future features, like tarball dependencies, will run into the same issue as described above, and so would rely on this feature too.