Project

General

Profile

Actions

Feature #11252

closed

Integrated "did_you_mean" gem to ruby-core

Added by hsbt (Hiroshi SHIBATA) over 9 years ago. Updated over 9 years ago.

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

Description

Matz hope to integrate "did_you_mean" gem to Ruby 2.3

We need to solve to following issues.

  • integrate interception gem
  • naming(better name for did_you_mean)
  • bundled policy(standard library? bundled gem?)

Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #11032: Add a warning for misspelling "def intialize"ClosedActions

Updated by hsbt (Hiroshi SHIBATA) over 9 years ago

  • Assignee set to hsbt (Hiroshi SHIBATA)

Updated by matz (Yukihiro Matsumoto) over 9 years ago

Approved. Go ahead and resolve issues related to merge.

Matz.

Updated by yuki24 (Yuki Nishijima) over 9 years ago

It's a great honor and privilege for me to see the did_you_mean gem become part of the language and I am really grateful to this movement.

I've created a branch that only works on 2.3, but has less dependencies: https://github.com/yuki24/did_you_mean/compare/master...ruby-2.3

integrate interception gem

interception gem isn't actually mandatory since the branch uses TracePoint API directly to capture a binding object.

naming(better name for did_you_mean)

The only name I have in mind is correctable, but I'm open to sggestions. The main reason why I want to use a different name and force people to use a new one is that the current version of did_you_mean knows about too many external things including JRuby, Rubinius and Rails and I don't want Ruby to bundle it.

bundled policy(standard library? bundled gem?)

I would like the gem to be a bundled gem to minimize the maintenance cost of it, but a couple of features(e.g. NoMethodError#receiver: #10881, detailed error message) have to be implemented before it is bundled.

Thank you again for considering adding the did_you_mean gem to the language and I would love to do whatever I can to make it happen!

Actions #4

Updated by duerst (Martin Dürst) over 9 years ago

  • Related to Feature #11032: Add a warning for misspelling "def intialize" added
Actions #5

Updated by yuki24 (Yuki Nishijima) over 9 years ago

We've discussed this at the Ruby developers meeting on Thursday and made several decisions(but still subject to change).

  • We are not going to rename the gem (we'll just use did_you_mean)

  • It'll be a bundled gem (Yuki will be responsible for releasing a version that works on Ruby 2.3 without C extensions)

  • There should be a way of disabling this feature entirely (--disable-gem did_you_mean or --disable-gemname)

  • There should be a method on NameError that returns a qualified name:

    class User; end
    
    error = begin
      User::DoesntExist
    rescue NameError => e
      e
    end
    
    error.name           # => :Exist
    error.qualified_name # => :"User::DoesntExist"
    

The last 2 features can be separate features. That said, since the last one is a blocker, it would be great if this could be done before actually bundling the did_you_mean gem.

Actions #6

Updated by Anonymous over 9 years ago

  • Status changed from Open to Closed

Applied in changeset r51795.


gems/bundled_gems: Automatically install the did_you_mean gem as a bunlded gem.
[Feature #11252]

Actions #7

Updated by Hanmac (Hans Mackowiak) over 9 years ago

shouldnt that be fixed to "1.0.0.beta2" because "1.0.0.beta1" got yanked?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0