asinghbrar

asinghbrar

Any tips or advice for monorepository tooling?

Hi everyone,

We’re in the process of moving our organization toward a monorepo and I’d love to hear from folks who’ve done this with Elixir in the mix.

Right now our primary codebase is an Elixir monolith, but we also run essential services in Java, Go, and Python, and our frontend is in TypeScript. As we continue to scale, parts of the Elixir system will be split out into separate services, and some of that functionality will likely be reimplemented in Java.

We’re evaluating build/test tooling for the monorepo and are currently looking at Bazel. The challenge is that Bazel’s Elixir ecosystem still feels pretty early, so we’re trying to figure out whether to invest there or consider other approaches.

If you’re running Elixir in a polyglot monorepo (especially alongside JVM services), I’d really appreciate any lessons learned:

  • What build / test / packaging tooling are you using?

  • How are you handling dependency isolation and release management?

  • Any gotchas with cross-language CI or incremental builds?

Happy to share more context if helpful, and open to DMs if you’ve been down this path and wouldn’t mind a quick chat.

Most Liked

Arsenalist

Arsenalist

Hey, I see this happening in my app in the future and was doing some research on some tooling like Nx etc, but I’m contemplating just managing this stuff using mise and it’s Monorepo support which is experimental:

Benefits like detecting affected files etc may not come out of the box with this approach, but it seems simpler to get started with.

phcurado

phcurado

I have used elixir and other languages in a single monorepo. We choose to separate the tooling for elixir projects to the other languages for the same reason you mentioned: The generic tools that handles monorepos doesn’t seem mature enough for elixir.

We used the elixir workspace and it was good for my use case. This project have mix tasks that can identify automatically elixir projects and dependencies, build only changed projects and print the project dependency graph for better visualization of your projects.
Then on our other tools to manage other languages inside the monorepo, we would just ignore elixir projects.

We were using trunk based development, merge to main would release the application. If a dependency was changed, it would build and test app projects that are using the dependency (elixir workspace can identify/track this). We were not versioning the dependencies, since we didn’t want to handle different versions of a dependency inside the same monorepo. This is similar to the Facebook monorepo approach, no versioning to avoid inconsistencies.

For us it worked quite well, I would say better than expected even. It also would depend on the engineers, company development culture and project’s ownership.
One thing we could have done is to have the elixir codebase in a separated monorepo, since we were not reusing anything from the other languages and packages there. I guess this would depend more on your use case, but overall I was happy with the setup.
Atomic changes are great because in a single merge I could deploy multiple projects but you need a good tooling, automated tests, etc on your projects since a single commit can also break multiple projects. In general needs strategy for rollbacks, deployment (blue/green, canary, feature flags, etc) so you are confident whenever you merge/deploy your code.

Last Post!

asinghbrar

asinghbrar

This is super helpful, thank you. We also lean on mise-en-place as a first-class tool for dependency management, and I briefly looked at its experimental monorepo support. That said, it still feels a bit early for our use case, we’d really like to take advantage of the CI, caching, and packaging benefits you get from more mature monorepo tooling, especially since we already manage a frontend monorepo with Nx.

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement