matthewp / robot

🤖 A functional, immutable Finite State Machine library

Home Page:https://thisrobot.life

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make Robot a monorepo

matthewp opened this issue · comments

Currently Robot is split between robot, lit-robot, react-robot, preact-robot, haunted-robot, robot-hooks (is that all). But these libraries are pretty tightly coupled. For easier maintenance I think it might be a good idea to make them into a monorepo.

Since 1.0 isn't going to have a breaking change I think it's a good time to do so.

Every. Single. Time. the choice is not so easy. ;)

Recently I read https://medium.com/@patrickleet/mono-repo-or-multi-repo-why-choose-one-when-you-can-have-both-e9c77bd0c668 describing the dilemma between mono-repo and multi-repo.

The post describes a tool called meta, based mainly on loop tool.

At the end I have not any meta repository, but I have been using loop tool.

In my context, the backend contains a lot of micro-services, following the same git conventions in terms of branches and other details. Surely the IDE can help, but the CLI helps in change management.

My two cents. ;)

How about a hybrid?
I would be in favor of a github 'organization'... perhaps 'thisrobot' for org name.
mono repos under the org, but organized by purpose, i.e.,

thisRobot

  • core - robot3
    • templates - collection of reusable machines
  • integration - all framework/library integrations
    • react
    • preact
    • haunted
    • svelte
    • lit
  • tools - things like visualizers, chrome extensions, vscode extensions, etc
    • viz
    • vscode
    • chrome

I don't see need for more than 3 mono repos... but hey, who knows.

I actually implemented a monorepo in a branch, but now I'm unsure. The downside to me is mostly the feeling to continue to maintain integrations even when they are not used as much. I would rather give people write access to those integrations so they can maintain them themselves. Not that any of the currently integrations are difficult, most of the logic is in robot-hooks.

The main downside to the multiple repos is that when 1.0 is released I'll have to update all of them. But that's a 1 time thing, I don't think we'll be making breaking changes all that often.

So for now I'm leaning towards leaving it as multiple repos.

Realize this is off topic, but how about a github organization for robot stuff? Have you given that any thought?

Not a whole lot. I kind of like what Preact did, which was under developit/preact for a long time, but eventually others started becoming the main contributors and then it was moved to an org. I'm not saying it has to stay under my name for a long time, but given that I do most of the development I would like to get credit for it through the repo :). Of course there have been many awesome contributors, and I want to give them credit in other ways. thisrobot is a really good org name though!

One of my lazy habits is to use github search to navigate to repos. Currently, this robot repo is hard to find (pun intended).
As for credit... I don't understand how being an owner and contributor of an organization diminishes your credit. Not disagreeing with you, I just suspect that I don't know enough or am too green to understand. My assumption was that the owner and contributor of a self sustaining ecosystem deserved more credit.
But I do understand wanting to take things slow. Thinking about Rich Harris and how his life has perhaps been impacted since svelte has blown up. Or how there's pressure to change direction due to outside influence.
No pressure. Thank you from creating robot. I'm here to help in any of the limited ways that I can.

No problem! I appreciate the discussion. You make a lot of good points. I can see us having an organization in the future, that will help with some of the issues of having multiple projects without bring in a monorepo.

I'm going to close as the monorepo thing isn't going to happen for the time being, but happy to continue discussing here.

Ok, I do keep thinking about this 😂