Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Standardise a mechanism for cross-package dependencies #941
I thought we already had an issue for this, but couldn't find one. Close as a dup if I missed it.
Currently there are two mechanisms in play for cross-repo dependencies:
The disadvantage of using npm is that it enforces a multi-step approach, where changes must be published before they can be used in-tree. It's also node-specific.
The disadvantage of the ad hoc approach is that it requires scripting to run for the dependency to be present. I think I caught most of the cases in that PR but still, it's kind of messy and wastes disk space (which would be more of a concern if we were to adopt it as a standard mechanism for all the deps).
In an ideal world, if we get #694 done we might find that the repo size including dependencies is small enough that we could use a single Docker image for all packages that includes the entire repo. Then we could just
Maybe we could introduce a generalised version of the copy approach in our scripting as an interim measure, e.g. where we look for certain dependencies in
Plus there's probably other possibilities I haven't considered here, @mozilla/fxa-devs feel free to weigh in with suggestions or whatever.
Can lerna help us out more here? I haven't played with it a bunch yet. I see lots of mentions in the docs about linking inter-dependent packages from the project itself, but scratching my head at whether it helps keep external dependencies in sync between local packages.