If you have a codebase in a large monorepo is it possible to code share
The build process starts by “chopping up” the repository into applications based on the .upsun.app.yaml files (or source.roots in applications.yaml). Each application then has no knowledge of code outside of its sources.root, nor can it. The build process is based on the Git Tree ID, which is the hash of the files in a given directory. It cannot piecemeal assemble other directories without breaking the logic around whether a build is safe to reuse or not.
If you want to share code between applications, your options are:
- Use the package manager.
- Use a Git submodule
- Manually download the code from somewhere in the build script.
Comments
Please sign in to leave a comment.