Skip to content

Improve loader CLI ergonomics - #365

Open
flyingsilverfin wants to merge 1 commit into
typedb:masterfrom
flyingsilverfin:loader-error-messages-and-usage
Open

flyingsilverfin wants to merge 1 commit into
typedb:masterfrom
flyingsilverfin:loader-error-messages-and-usage

Conversation

@flyingsilverfin

Copy link
Copy Markdown
Member

Usage and product changes

  • Reformat error messages with easier to read spacings
  • warn when --create-db creates a database without a --schema-file
  • override the clap usage line with one synopsis per invocation mode (fresh load vs --resume).

Implementation

Update error messages and help menu

Reformat multi-option error messages (checkpoint exists, --batch-rows
resume conflict, in-flight batch prompt) as indented solution lists,
warn when --create-db creates a database without a --schema-file, and
override the clap usage line with one synopsis per invocation mode
(fresh load vs --resume).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread loader/cli.rs

pub const USERNAME_VALUE_NAME: &str = "username";

/// The two invocation modes: a fresh load (connection, database, query, and data are required),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@sam-butcher this is gonna be deleted but i can't on the plane cuz my ssh connection gets blocked lol

@sam-butcher sam-butcher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While we're addressing the --create-db without --schema-file question, is it worth making that an error up-front actually? I can't really think of any use case where passing --create-db without --schema-file will do anything other than error later on anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants