latticexyz / mud

MUD is a framework for building autonomous worlds
https://mud.dev
MIT License
723 stars 181 forks source link

skip invalid table names in SQLite indexer #2156

Open alvrs opened 8 months ago

alvrs commented 8 months ago

The SQLite indexer currently breaks when it attempts to create a table for an invalid table name (ie containing spaces or invalid characters). Instead, the indexer should skip those tables.

image

holic commented 8 months ago

Before we do this, we should probably add some validations elsewhere (config, registration methods, etc.) so that folks aren't surprised by this when their data isn't indexed.

holic commented 8 months ago

We could also work around this with some sort of translation layer for invalid chars, similar to punycode converting unicode to domain-valid chars

alvrs commented 8 months ago

Before we do this, we should probably add some validations elsewhere (config, registration methods, etc.) so that folks aren't surprised by this when their data isn't indexed.

Agreed, and even before that a useful quickfix would be catching and printing the error instead of killing the process