latitude-dev / latitude

Developer-first embedded analytics
https://latitude.so
GNU Lesser General Public License v3.0
719 stars 30 forks source link

Remove mutual version dependency between app and CLI #433

Open csansoon opened 1 month ago

csansoon commented 1 month ago

Feature Description

Ever since we started developing the CLI, we have had a mutual dependency between the app and the CLI, where you cannot use a specific version of the app without changing to the specific compatible version of the CLI. This makes no sense really. I, as a user, may want to use an older version of the app for any reason, but I can't if I don't set my CLI to the specific version that is compatible to that one, and I don't even know what that version is.

To fix this, we could move all of the possible server-related logic from the CLI to the server package as scripts. This way, how the CLI starts and handles the server, which is required by the server, sill not be dependant on the CLI version, but rather on the server version. User will be able to use the same CLI version for any version of the server.

Current Solution / Workarounds

Currently, updating the the server will make it not work unless the user updates the CLI too. Also, running a downgraded server version is not possible unless the CLI is downgraded too to the specific compatible version, which is not known by the user.

csansoon commented 2 weeks ago

Although both these packages are too coupled, how can this actually be fixed, or at least, reduced? Many commands do not depend on the server, and the ones that do dev, run, materialize... are already just invoking a command from the server, where everything else is handled by the server itself. Can we actually improve this further?