Feature #11252
closedIntegrated "did_you_mean" gem to ruby-core
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?)
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!
Updated by duerst (Martin Dürst) over 9 years ago
- Related to Feature #11032: Add a warning for misspelling "def intialize" added
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.
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]
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?