powersync-ja / powersync.dart

SDK that enables local-first and real-time reactive apps with embedded SQLite for Flutter/Dart clients
https://www.powersync.com
133 stars 18 forks source link

schema.validate don't validate duplicate table names #190

Closed JCKodel closed 3 weeks ago

JCKodel commented 1 month ago

I've created a schema with a mistake: I've repeated a table name in other table:

final schema = Schema(
  Table("users", [...]),
  Table("users", [...]), // SHOULD BE "devices"
  ...
);

schema.validate();

validate() did nothing to warn me about my mistake.

mugikhan commented 1 month ago

Hey @JCKodel thank you for bringing this to our attention. This has been fixed and released in PowerSync v1.8.7.

mugikhan commented 3 weeks ago

Hey @JCKodel just checking in, does v1.8.7 solve the issue?

JCKodel commented 3 weeks ago

@mugikhan To be honest, we decided not to use PowerSync anymore. There were some events (at least 4 times so far) where something goes wrong (we think an exception is thrown) and the powersync code never returns. The last case was: we opened an connection, then issued a SELECT and the app just freezes. The select never returns. Stopping VSCode we then see an "Closed exception" in the debug console (but the database was just opened one line before). We think this could be related with other libraries using SQLite (cached_network_image), but we're not sure. With VSCode just frozen (not paused in any exception), is hard to tell what went wrong. Breaking on ALL exceptions also do nothing (the app freezes, VSCode freezes and no exception is caught).

rkistner commented 3 weeks ago

@JCKodel That sounds really frustrating. I'm sorry to hear that, and we appreciate your feedback.

I'm closing this issue for now, since the original schema validation issue is fixed now. If you do ever want to try out PowerSync again, we'd be happy to assist with debugging your other issues. Our Discord is very active, or you can open new issues here on GitHub.