Skip to content

Conversation

@kistz
Copy link
Contributor

@kistz kistz commented Jan 3, 2026

Description of Changes

The syntax is not supported like shows and must be included in the table macro.

API and ABI breaking changes

None.

Expected complexity level and risk

0 No runtime change

Testing

  • Code compiles now.

Signed-off-by: Kilian Strunz <93079615+kistz@users.noreply.github.com>
@cloutiertyler
Copy link
Contributor

Is there any more context on this change?

@kistz
Copy link
Contributor Author

kistz commented Jan 4, 2026

@cloutiertyler yes. index being a separate macro invocation is not supported. it must be inside the table macro. i assume this is because you can have multiple tables per struct definition so the separate index would be ambigous. :>

Example that it doesnt work: (error is that index is not found in spacetimedb)
image

@egormanga
Copy link
Contributor

It would actually be more reasonable to support this syntax instead.

@kistz
Copy link
Contributor Author

kistz commented Jan 5, 2026

I dont necessarily think so because of the ambiguity mentioned above but thats a separate discussion anyway.
IMO it is worth fixing mistakes in docs immediately since it increases friction for new users and you can always add the syntax back at a later stage.
However i dont feel strongly about this pr so feel free to close. just thought this was faster than creating a issue for it :>

Copy link
Collaborator

@bfops bfops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a straightforward docs fix to me, approving.

Thank you for this!

@bfops bfops enabled auto-merge January 6, 2026 14:49
@bfops bfops added this pull request to the merge queue Jan 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants