Problem
Version information is not displayed during normal CLI execution (when processing files). Users expect to see the version string at the start of every execution.
Current behavior
✅ Version shown correctly for: -V, --version, --help (via clap)
❌ Version NOT shown when: executing with file parameters (e.g., bbl_parser myfile.bbl)
Expected behavior
Version should be printed at the start of ALL executions, including normal file processing:
bbl_parser 0.9.0 14be1ee (2025-12-04)
Processing: myfile.bbl
...
Context
The VERSION_STR format was temporarily broken in commits d82343a/1711b6f (missing CARGO_PKG_VERSION), but was fixed in 65b64cc and now has the correct format.
AI-instructional implementation plan
1. Add version printing to main execution flow
In src/main.rs::main(), add println!("{} {}", env!("CARGO_PKG_NAME"), VERSION_STR); immediately after get_matches().
Note: Clap automatically exits after handling --version/--help, so the println only executes during normal file processing.
2. Verification test cases
Test all contexts: -V, --version, --help, no parameters, and normal execution with files.
3. Acceptance criteria
References
Problem
Version information is not displayed during normal CLI execution (when processing files). Users expect to see the version string at the start of every execution.
Current behavior
✅ Version shown correctly for:
-V,--version,--help(via clap)❌ Version NOT shown when: executing with file parameters (e.g.,
bbl_parser myfile.bbl)Expected behavior
Version should be printed at the start of ALL executions, including normal file processing:
Context
The VERSION_STR format was temporarily broken in commits d82343a/1711b6f (missing CARGO_PKG_VERSION), but was fixed in 65b64cc and now has the correct format.
AI-instructional implementation plan
1. Add version printing to main execution flow
In
src/main.rs::main(), addprintln!("{} {}", env!("CARGO_PKG_NAME"), VERSION_STR);immediately afterget_matches().Note: Clap automatically exits after handling
--version/--help, so the println only executes during normal file processing.2. Verification test cases
Test all contexts:
-V,--version,--help, no parameters, and normal execution with files.3. Acceptance criteria
-V,--version,--help(via clap, unchanged)bbl_parser 0.9.0 14be1ee (2025-12-04)References