From 5f103e968fb6bb4902bb85684859044c89b31fd1 Mon Sep 17 00:00:00 2001 From: dak2 Date: Sun, 19 Apr 2026 10:20:23 +0900 Subject: [PATCH] Deprecate 'watch' subcommand Print a runtime warning on stderr and mark the command as [DEPRECATED] in --help so users can migrate before removal in a future release. Also drop the "Watching for File Changes" section from README. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 7 ------- core/src/cli/args.rs | 2 +- core/src/main.rs | 1 + ext/src/cli.rs | 1 + 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 68da188..8aba160 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,6 @@ gem install methodray bundle exec methodray check app/models/user.rb ``` -### Watching for File Changes, Re-checking Methods - -```bash -# Watch a file for changes and re-check on save -bundle exec methodray watch app/models/user.rb -``` - #### Example Usage `bundle exec methodray check app/models/user.rb` diff --git a/core/src/cli/args.rs b/core/src/cli/args.rs index 685f92b..35e5726 100644 --- a/core/src/cli/args.rs +++ b/core/src/cli/args.rs @@ -25,7 +25,7 @@ pub enum Commands { verbose: bool, }, - /// Watch a Ruby file and re-check on changes + /// [DEPRECATED] Watch a Ruby file and re-check on changes Watch { /// Ruby file to watch #[arg(value_name = "FILE")] diff --git a/core/src/main.rs b/core/src/main.rs index d3a26ef..f58a955 100644 --- a/core/src/main.rs +++ b/core/src/main.rs @@ -32,6 +32,7 @@ fn main() -> Result<()> { } } Commands::Watch { file } => { + eprintln!("WARNING: 'watch' is deprecated and will be removed in a future version."); commands::watch_file(&file)?; } Commands::Version => { diff --git a/ext/src/cli.rs b/ext/src/cli.rs index 1a02765..2517ab9 100644 --- a/ext/src/cli.rs +++ b/ext/src/cli.rs @@ -19,6 +19,7 @@ fn main() -> Result<()> { } } Commands::Watch { file } => { + eprintln!("WARNING: 'watch' is deprecated and will be removed in a future version."); commands::watch_file(&file)?; } Commands::Version => {