marcin

marcin

Monorepo build system for mixed Elixir / Typescript / Other codebase?

Can you recommend a build system for a monorepo?

There is an overwhelming list of build systems and hence approaches to a monorepo here: GitHub - korfuri/awesome-monorepo: A curated list of awesome Monorepo tools, software and architectures. · GitHub; I am looking for some recommendations.

We build an Elixir based server and a bunch of Typescript/Javascript SDK libraries, as well as some microservices (for NodeJS, python platforms).
The projects interact using GraphQL and AMQP (messages in RabbitMQ) APIs.
We found it hard to manage this interoperability using multiple repositories and would like to try out a monorepo.
Each of these projects will have it’s own build system and artifacts - so for Elixir we use standard mix release, for JS we use yarn and publish packages to npm, same for python and packages on pypi.
AFAIR the monorepo build system can help out to mange these project-level build systems on a top, codebase level; I do not have any experience with that so far.

Can you recommend a build system and its approach? Or maybe I do not need any and I just need a top level Makefile / bash script that builds everything recursively ?

Most Liked

dimitarvp

dimitarvp

I’ve had limited success with GitHub - casey/just: 🤖 Just a command runner · GitHub in polyglot repos but have in mind it’s more of a generic task runner without some truly dedicated DAG dependency management like other modern tools have.

I want to try GitHub - ejholmes/walk: A fast, general purpose, graph based build and task execution utility. · GitHub but haven’t had a chance yet. I’ve heard good feedback in HN.

wolf4earth

wolf4earth

While I haven’t used it on a big monorepo yet, I really enjoyed using earthly.dev in a phoenix project with a non-trivial webpack setup.

It’s basically Dockerfile meets Makefile, which is surprisingly powerful since you can use docker images as the base for your targets, so you don’t have to think about how to setup your build environment.

olivermt

olivermt

What you normally do is have multiple runners per project. Most of my projects kick off different pipelines in api/, mobile/ or client/ (depending on if there were changes ofc).

I use this pattern on Circle, azure devops and github actions.

Edit: assuming you deploy the various platforms to different places. If your client is served by elixir you would just have another step to compile assets on top of the rest.

While makefiles etc are fine, 99.99% of the time Bash will do just fine.

Where Next?

Popular in Questions Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
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
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics 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
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
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44778 311
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
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement