Repository navigation
Standardize command related names - #873
Conversation
d66af64 to
5cb1821
Compare
|
I think we can maybe postpone the raise of deprecation warning. Otherwise, gems need to start requiring IRB release with this PR + start referencing to the new constants to avoid the warning. But at the same time, it won't bring immediate benefit to them, nor us, other than having clearer names in their codebase. Update: I decided not to raise deprecation warning on old constants. |
7856c3d to
30ce967
Compare
|
It looks like some repository is requiring How about adding a file |
1. Rename lib/irb/extend-command.rb to lib/irb/command.rb 2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb 3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb 4. Rename ExtendCommand to Command
30ce967 to
0d514c7
Compare
|
@tompng That's a good point 👍 |
(ruby/irb#873) * Replace ExtendCommand with Command and standardize command related names 1. Rename lib/irb/extend-command.rb to lib/irb/command.rb 2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb 3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb 4. Rename ExtendCommand to Command * Alias ExtendCommand to Command and deprecate it * Rename Command::Nop to Command::Base * Not deprecate old constants just yet * Add lib/irb/cmd/nop.rb back ruby/irb@462c1284af
#3408 のタスク実施。 until の追加(実装側の削除・移動時期は #3408 で確定済み): - irb/ruby-token: 2.7.0(ruby/irb の Remove ruby-token.rb) - irb/extend-command: 3.4(ruby/irb#873 で default_commands.rb に刷新) - irb/cmd/{chws,help,load,pushws,subirb}: 3.4(lib/irb/command/ へ移動。 cmd/nop.rb のみ 3.4 でも残存するため nop.md は対象外) - irb/ext/save-history: 3.4(lib/irb/history.rb へ移動) require リストの修正: - 3.0 時点で実装に存在しない依存を削除: completion と ext/save-history の readline・ext/multi-irb の thread・ruby-lex の irb/ruby-token・ input-method の readline(実装は 3.0 から無条件 require "reline"。 reline の文書は未整備のためリンクは張らない) - リンク先が 3.4 で消えるものを #%until 3.4 でゲート: irb.md の irb/extend-command・ext/use-loader の irb/cmd/load 境界 4 版(2.6/2.7/3.3/3.4)の DB で存否と requires を機械検証。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Before we expose command extension APIs, I think it'd be beneficial to first standardize (or even modernize) the names we use for command related concepts. This includes namespace, base class, and folder names:
lib/irb/extend-command.rbtolib/irb/command.rblib/irb/cmd/*.rbtolib/irb/command/*.rbtest/irb/test_cmd.rbtotest/irb/test_command.rbExtendCommandtoCommandand alias it toCommandNoptoBaseand alias it toBase