drush search-api-reindex should use modulename:command format

Created on 27 July 2022, over 2 years ago
Updated 8 September 2024, 4 months ago

Problem/Motivation

The Drush command "search-api-reindex" uses the old command naming convention where each piece of the name is separated by a dash, whereas the current convention is to namespace them.

Proposed resolution

Rename the "search-api-reindex" command to "search-api:reindex" and leave the old version as an alias.

Remaining tasks

Provide a patch.

๐Ÿ“Œ Task
Status

Closed: won't fix

Version

1.0

Component

Drush / Rules

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    Thanks for creating this issue, and sorry it took me so long to respond.
    It seems the command name already is namespaced properly, and that aliases generally arenโ€™t, as far as I can see. Therefore, I donโ€™t really see the benefit of adding another alias, same as the old only with a colon in place of one dash. Or is there some documentation, or some examples, that state that aliases should also use the colon namespacing?

  • Status changed to Active 4 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States tr Cascadia
    -   * @aliases search-api-mark-all,search-api-reindex,sapi-r,search-api-reset-tracker
    +   * @aliases search-api-mark-all,search-api:reindex,search-api-reindex,sapi-r,search-api-reset-tracker

    This adds a new alias, and does nothing else.

    Aliases have two uses:

    1. To shorten command names for easier typing.
    2. To provide backwards compatibility for old-style command names and previous command names that people might have gotten used to using.

    The second use-case is the most important IMO.

    The actual command here is search-api:reset-tracker, and that's in the proper form and that's what shows up if you list the commands using drush --filter=search-api.

    The search-api-reindex alias is for backwards compatibility with the Drupal 7 search-api-reindex Drush command.

    In my opinion we don't need a new alias that "looks like" a top-level command name. There are plenty of aliases for this command. If you were used to using search-api-reindex in D7 that will still work, as designed. Moving forward, you can keep using that or switch to the the current command (not alias) which is search-api:reset-tracker

    I recommend closing this as "works as designed" or "won't fix".

  • Status changed to Closed: won't fix 4 months ago
  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    I agree, thanks a lot for weighing in!

Production build 0.71.5 2024