SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

spacetime-update --version spacetime-cli --version and spacetime-standalone --version should all match

Open jdetter opened this issue 10 months ago • 1 comments

Right now we have these 3 binaries which give completely different outputs when you pass --version:

Boppy@JASKIER MINGW64 ~/clockwork/tmp
$ ./spacetimedb-standalone.exe --version
spacetimedb spacetimedb tool version 1.0.0-rc4; spacetimedb-lib version 1.0.0-rc4;

Boppy@JASKIER MINGW64 ~/clockwork/tmp
$ ./spacetimedb-cli.exe --version
spacetime Path: C:\Users\Boppy\clockwork\tmp\spacetimedb-cli.exe
Commit: f7c06cb4e85df20313fca6a0167b66170eb038d4
spacetimedb tool version 1.0.0-rc4; spacetimedb-lib version 1.0.0-rc4;

Boppy@JASKIER MINGW64 ~/clockwork/tmp
$ ./spacetimedb-update.exe --version
error: unexpected argument '--version' found

Usage: spacetime [OPTIONS] <COMMAND>

For more information, try '--help'.

These should be consistent so that its easier to identify what version a binary came from. Please change spacetime-update and spacetime-standalone to use this output (the CLI crate is already good):

Boppy@JASKIER MINGW64 ~/clockwork/tmp
$ ./spacetimedb-cli.exe --version
spacetime Path: C:\Users\Boppy\clockwork\tmp\spacetimedb-cli.exe
Commit: f7c06cb4e85df20313fca6a0167b66170eb038d4
spacetimedb tool version 1.0.0-rc4; spacetimedb-lib version 1.0.0-rc4;

Also the help section does not mention that --version is valid at all:

Boppy@JASKIER MINGW64 ~/clockwork/tmp
$ ./spacetimedb-update.exe --help
Manage installed spacetime versions

Usage: spacetime [OPTIONS] <COMMAND>

Commands:
  version
  self-install
  help          Print this message or the help of the given subcommand(s)

Options:
      --root-dir <ROOT_DIR>
  -h, --help                 Print help

Boppy@JASKIER MINGW64 ~/clockwork/tmp
$ ./spacetimedb-update version
Usage: spacetime version <COMMAND>

Commands:
  list       List installed SpacetimeDB versions
  use        Set the global default SpacetimeDB version
  upgrade    Upgrade and switch to the latest available version of SpacetimeDB
  install    Install a specific SpacetimeDB version
  uninstall  Uninstall an installed SpacetimeDB version
  help       Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

These list the "version" subcommand which is completely different than --version. This is extremely confusing UX.

jdetter avatar Feb 21 '25 03:02 jdetter

I am arguing for this to go into the testing release because I wasted time testing the wrong binaries because I couldn't identify which release they came from (tested v1.0.0-rc4 binaries instead of v1.0.0 binaries because these version commands don't work as expected.)

jdetter avatar Feb 21 '25 03:02 jdetter