clockworklabs / clockworklabs/SpacetimeDB

Improve `spacetime call` diagnostics for invalid / ill-typed arguments

Open
#2,066 1 comment 0 reactions 1 assignee View on GitHub

@gefjon is already working on this.

Since Jan 6, 2025.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

Today (2024-04-10), I (pgoldman) had to hop into a call with the BitCraft team to explain the correct syntax to call a reducer which took a C-style enum as an argument via the CLI. Ideally, the CLI error message should have given them enough information to determine a correct call on their own. Consider:

  • Changing the CLI's parsing to accept strings for C-style enums (They were trying to pass "Admin", when the correct parse was { "Admin": {} }, which is a stupid and unintuitive format).
  • Printing a sample invocation which will parse correctly.
  • Linking the docs for the JSON format used by the CLI.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.