Skip to content

Duplicated versions of jecs do not emit useful error messages #315

Description

@kurokuukyo

Describe the bug

When using jecs and the user unintentionally has multiple versions of jecs in use, the NULL_ARRAY variable can be used across versions, causing error messages because jecs only checks for its own local copy. I believe this should be the default behavior, but it can use more useful error messages.

Reproduction

This issue happens whenever two versions of jecs operate on a query. The easiest example I can think of to demonstrate this is how the jecs-utils project uses a local copy of jecs to act on queries. If these versions mismatch, the bug occurs.

What makes this bug tricky to debug is that the code at issue doesn't immediately trigger the bug, a subsequent add/set/remove operation causes the error because it can't write to the columns.

For note, I believe this covers every attempt to modify a readonly table error in the codebase.

Expected Behavior

Jecs should catch this error in debug mode and emit a message saying not to use multiple versions of jecs.

Actual Behavior

Error messages that are not useful for debugging this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions