Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jdetter opened this issue Feb 21, 2025 · 1 comment
Assignees

Comments

@jdetter
Copy link
Collaborator

jdetter commented Feb 21, 2025

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 jdetter self-assigned this Feb 21, 2025
@jdetter
Copy link
Collaborator Author

jdetter commented Feb 21, 2025

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.)

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

No branches or pull requests

1 participant