What’s wrong with Umbrella Apps?

I’d upvote this more than once if I could. mix xref doesn’t play nice at all with umbrella applications. It’s a PITA to make it work and find links between applications, and answering questions like “how much of this codebase is affected if I refactor this one function?” are very difficult to answer when your tools don’t understand umbrellas well enough.

This is a big point for me, not to mention that OTP applications are a runtime and deployment concern, not a code separation tool, so it doesn’t even make sense to use an umbrella for code organization in the first place. Tools like GitHub - sasa1977/boundary: Manage and restrain cross-module dependencies in Elixir projects offer a better way to tackle the “I don’t want code from this module to be called by this other module” problem in a saner way that doesn’t break most of the tools out there.

Also the fact that you have to append “in an umbrella app” whenever you ask someone for advice on fixing your weird bug should be a sign that something is off from the start.

I’d like for people to ask the question the other way around: why introduce umbrellas in the first place? rather than thinking that an umbrella is a good idea because reasons and then trying to find pain points later on.

4 Likes