clockworklabs / clockworklabs/SpacetimeDB

2.0: make `spacetime publish` `--yes` argument an enum

Open
#3,784 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Right now the options are a bit confusing for publish:

--break-clients can be specified if you want to skip the "are you sure you want to break clients" prompt, but it won't break clients if there isn't a breaking change.

--yes responds yes to all prompts except the login prompt

TODO

We'd like --yes to instead be an enum which can accept the following things:

--yes all|migrate|break-clients|skip-login

remote - responds yes (if applicable) to the prompt: "Are you sure you want to publish to a remote server?"
migrate - responds yes (if applicable) to the prompt: "Are you sure you want to migrate?"
break-clients - responds yes (if applicable) to the prompt: "Are you sure you want to break clients?"
skip-login - responds no (if applicable) to the login prompt
--all is the same as remote|migrate|break-clients|skip-login

multiple options can be specified, like:

# skip prompts for migrations and login but not for breaking clients
spacetime publish --yes "migrate|skip-login"

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.

Research direction

Start by locating the spacetime publish CLI entry point and the existing handling for --yes, --break-clients, and the listed prompts. Trace how prompt responses are selected, then verify that the requested enum values and combinations produce the described responses for remote publishing, migration, breaking clients, and login.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.