Crowdhailer

Crowdhailer

Creator of Raxx

Opinions on using MonoRepos for library code?

I’m considering using a single Github repository that will contain the code for more than one mix project, where each mix project is hosted on hex. I think it is a good idea for my usecase but wondered if there were any negatives I had not considered. Rather than discuss my usecase which is a project very much under development It might be easier to explain in the context of a more established project such as ex_aws.

Currently ex_aws has a single lib directory in which there is the code for iteration with many amazon services such as SNS S3 EC2. If following SemVer then a breaking change to any one of these pieces of functionality will require a major version change. However the majority of users are probably only using a fraction of the services available.

What would be the benefits/costs of changing to the following structure?

ex_aws (repo root)
-- ex_aws_s3 (individual mix project)
---- lib
------ s3
---- mix.exs
-- ex_aws_ec2 (another individual mix project)
---- lib
------ ec2
---- mix.exs

In this case a breaking change to ex_aws_ec2 could be released to hex without changing anything about ex_aws_s3.
In addition keeping them all together allows a single readme etc for documentation about the whole project.

For those whole are familiar I think I am looking for a way to implement something similar to the features feature available in the Rust ecosystem

Most Liked

Gazler

Gazler

Phoenix Core Team

This is coming in 1.4 with sparse checkouts.

Search for “sparse” on https://hexdocs.pm/mix/1.4/Mix.Tasks.Deps.html#content

  [{:somedep, github: "someuser/somedep", sparse: "some/nested/dir"}]
benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

It’s likely not actually relevant to the overall point of the post, but the argument against breaking up ExAws is:

  • Breaking changes are incredibly rare, because breaking changes with the AWS API are incredibly rare.
  • Quite a bit of code is shared across services, because most service modules are just nice ways of creating one of only a handful of operation structs.

Where Next?

Popular in Discussions Top

mmmrrr
Just saw that dhh announced https://hotwire.dev/ Is it just me or is this essentially live view? :smiley: Although I like the “iFrame-e...
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
ricklove
I was just introduced to Elixir and Phoenix. I was told about the 2 million websocket test that was done 2 years ago. From my research, t...
New
nunobernardes99
Hi there Elixir friends :vulcan_salute: In a recent task I was on, I needed to check in two dates which of them is the maximum and which...
New
Qqwy
Looking at the stacks that existing large companies have used, WhatsApp internally uses Mnesia to store the messages, while Discord uses ...
New
New
eteeselink
Hi all, In the last days, two things happened: A blog post titled “They might never tell you it’s broken” made the rounds. It’s about ...
New
AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
RudManusachi
What configs will make sense to put to runtime.exs? – A bit of how I configure apps: I have generic configs in config/config.exs, dev...
New
jsonify
So, is Heroku the only free option for hosting Phoenix/Elixir at this point? I’m not ready to commit to paying monthly and was wondering ...
New

Other popular topics Top

marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
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
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
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I'm a nov...
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