Project

General

Profile

Actions

Feature #16363

closed

Promote did_you_mean to default gem

Feature #16363: Promote did_you_mean to default gem

Added by yuki24 (Yuki Nishijima) almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Target version:
-
[ruby-core:95917]

Description

The did_you_mean gem has been a bundled gem for over 3 years now and I think it's time to promote it to a standard library. There are two main issues in the current structure:

  • A number of implementations, including optparse.rb, rake, and rails, now take advantage of the gem's spell checker, but it's awkward to have to check the existence of the DidYouMean::SpellChecker constant.
  • there are some problems with regard to bundler + did_you_mean because of did_you_mean being a bundled gem. Since the vendored version of thor inside bundler and ruby itself explicitly requires did_you_mean, it can become difficult to load it when using Bundler.setup. See this issue: https://github.com/yuki24/did_you_mean/issues/117#issuecomment-482733159 for more details.

I would like to promote the gem up to a standard library and make it always available, so we can always reliably require it whenever we want to.

A patch could be found here: https://github.com/ruby/ruby/pull/2689


Related issues 2 (0 open2 closed)

Related to Ruby - Bug #16427: Revert did_you_mean promotion to default gem.Rejectednobu (Nobuyoshi Nakada)Actions
Related to Ruby - Feature #16431: Optionally load did_you_mean (and RubyGems)Closedhsbt (Hiroshi SHIBATA)Actions

Updated by shevegen (Robert A. Heiler) almost 6 years ago Actions #1 [ruby-core:95920]

\o/

(^^^ That's an upvote emoji really.)

Updated by matz (Yukihiro Matsumoto) almost 6 years ago Actions #2 [ruby-core:96014]

Accepted. Go ahead.

Matz.

Updated by vo.x (Vit Ondruch) almost 6 years ago Actions #3 [ruby-core:96127]

I think we should go rather in opposite direction. Move all gems to "bundled" gems. Especially "did_you_mean" gem does not provide any benefit to end user of application and it should not be used in runtime. It is just perfectly fine when its functionality is optional.

BTW since the PR was merged, this ticket should have been closed.

Updated by jeremyevans0 (Jeremy Evans) almost 6 years ago Actions #4

  • Status changed from Open to Closed

Updated by hsbt (Hiroshi SHIBATA) almost 6 years ago Actions #5 [ruby-core:96146]

  • Tracker changed from Bug to Feature
  • Assignee set to yuki24 (Yuki Nishijima)
  • Backport deleted (2.5: UNKNOWN, 2.6: UNKNOWN)

Updated by vo.x (Vit Ondruch) almost 6 years ago Actions #6

  • Related to Bug #16427: Revert did_you_mean promotion to default gem. added

Updated by vo.x (Vit Ondruch) almost 6 years ago Actions #7

  • Related to Feature #16431: Optionally load did_you_mean (and RubyGems) added
Actions

Also available in: PDF Atom