holium / realm

A sovereign network operating system built on Urbit
https://realm-onboarding.vercel.app
Other
4 stars 1 forks source link

Spin-off libs into their own repositories #1193

Closed ajlamarc closed 1 year ago

ajlamarc commented 1 year ago

Following Urbit's lead of spinning off http-api, the libraries under /lib should be in separate (eventually public) repositories. Outside developers will be interfacing with these directly, and it gives them a better place for PRs/issues and makes it easier to track what the latest version / developments are.

See this link: https://docs.github.com/en/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository

drunkplato commented 1 year ago

We should move them to be public, but make them a git submodule in the realm repo.

ajlamarc commented 1 year ago

Thinking more about dependencies, and there's going to be an issue with our current approach (at least with TomeDB, and presumably the other libs going forward.)

TomeDB's client (JS) side logic is currently in the package itself. So let's say we roll out a new package version / Gall agent: even though the external API for devs hasn't changed, their app is now broken until they go and install the new package version for their app.

The solution is to make our user libs as dumb as possible: they just dispatch the same event inside of Realm. And Realm has the power to update client / server at the same time. With breaking API changes we'll need to provide lead time and/or help developers with code refactoring.

Generally more thought needs to be put into dependency / upgrades / deployment etc. since this is uncharted territory with Urbit, but we have a good start already.

ajlamarc commented 1 year ago

once Tome is a part of Realm entirely we can give it a SQLite table as well so it's not slow.

ajlamarc commented 1 year ago

Closing since submodules are generally a bad idea: can create a separate issue for moving more into the monorepo.