SkillDevs / electric_dart

A Dart implementation for Electric (electric-sql.com).
Apache License 2.0
104 stars 9 forks source link

Version solving failed in todos example #3

Closed alterhuman closed 1 year ago

alterhuman commented 1 year ago

Getting this error on pubspec

Resolving dependencies... Because every version of electricsql_cli from path depends on electricsql from hosted and todos_electrified depends on electricsql from path, electricsql_cli from path is forbidden. So, because todos_electrified depends on electricsql_cli from path, version solving failed. exit code 1

Really excited to try electric btw. Thanks for building a dart client for it.

davidmartos96 commented 1 year ago

To run the example you need melos, so that the dependencies are picked correctly from the monorepo. I'll update the README

You need to install melos dart pub global activate melos

Then run melos bs at the root of the repository and then follow the TODOs example README

Make sure to try the example at a tagged commit, otherwise you may encounter unexpected issues. git clone --branch electricsql-0.2.1 <repo_url>

alterhuman commented 1 year ago

Thanks it worked. The sync is working smoothly. One mistake in docs, the migrations file name is apply-migrations.sh instead of apply_migrations.sh

Still figuring out the implementation. I hope you add supabase docs in future. Will open a new issue if required, closing this now.

Thanks for the quick reply.

davidmartos96 commented 1 year ago

@alterhuman Good catch, thank you! We are still not sure what extra configuration will be needed for Supabase support, but I don't think it will be much. We need to wait for Supabase support in the official Typescript client first. You can join the Discord for questions about Electric in general.