-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call
DidYouMean.correct_error(error_name, spell_checker)' instead."
#5234
Comments
Hi! Yeah, this was very unfortunate and I can see how it's annoying. The warning came up very close to the release, and we only had time to fix it, but not to become aware of how the feature of auto-installing the locked version and auto-switching to it on the fly would play with it. If I understood your suggestion properly, it is that we always log something when bundler auto-switches (by auto-switching I mean activating the locked version of bundler if available instead of the latest version). I think that might be too verbose and annoying. It would force users to upgrade all their apps to be locked to the latest bundler version installed in their system if they want to avoid this message being printed on every bundler invocation. It sounds like too much. Something I would've done if I had realized about this issue beforehand (I even considered it without knowing about this issue) is to limit this new feature to lockfiles generated with bundler versions >= 2.3, so that existing lockfiles get no behavioral change at all. I guess it won't have the desired effect now since ruby 3.1 is already out, but might be a good idea anyways? Not %100 sure. It's also really unfortunate to have introduced #5221 with the release, so it makes the recommended way out of this not work. Anyways, the fix for that will be released very soon. |
/cc @yuki24 |
I'll be releasing bundler 2.3.4 now, so that at least the easy way out of this warning, i.e., running I'm also considering limiting auto-switching to |
Also, just to make sure there's an easy way out of this posted here, running
should update your lockfile to use bundler 2.3.3 and get you out of this warning. Plain EDIT: I released bundler 2.3.4, so if you install that ( |
Sure, I get it could be too much. Is it possible to run Bundler in some sort of debug/verbose mode? So one can follow what's happening. Even |
Yes, this is the expected behavior. If you're in an application context, RubyGems chooses the locked version of Bundler in the What we have changed now, is that even if the exact version of Bundler is not present in the system before running Hope this makes sense.
We have a
right after start. However, |
Not sure if skipping this message in |
Apologies for the trouble this has caused. Is there anything I can do to mitigate the impact of the deprecation message? |
I'm still getting the warning after installing |
Similarly, I've followed directions to install bundler 2.3.4 and run bundle update --bundler, still seeing the error message. |
..At the risk of sound AOL-like from 1994 - me too. Sorry. |
@dmartinatdu you may be seeing it because despite installing newer version, old one is used to install your dependencies. |
@mensfeld I've removed all versions of bundler except 2.3.4 - still getting the warning. Viz:
|
@robertwoolley99 what about |
@mensfeld - 2.3.4 :
|
@robertwoolley99 no idea 🤷♂️ the last thing that comes to my mind, is to manually edit the end of |
Quick fix for those trying to get commands working as outlined here:
Or whatever your command is. You can export it like:
Then I can run |
Are you all running Ruby 3.1? If not, uninstalling the latest version of $ gem i did_you_mean -v=1.5.0
$ gem uni did_you_mean -v=1.6.1 |
@yuki24 Amazing thank you that worked perfectly :) |
Sorry for not being active the last few days, I'm moving home :) Just pointing out that people still getting this warning with latest bundler is probably due to Rails using @yuki24 Thanks for your attentiveness, I think it's fine. This was just an unlucky combination, and it should get better with time :) |
Here are some ideas to improve the warning in did_you_mean so it's not shown by default since it's a deprecation warning: ruby/did_you_mean#171 |
Is this more of a Rails problem? If so, one for 7.0.1... |
We won't be making any changes inside Bundler and/or RubyGems to address this, so I'll close this. Please make sure your application runs a Bundler version where this is fixed, and you should be ok. |
What's the result of |
+1 |
Suppress deperecation warning ``` Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead. ``` ref: rubygems/rubygems#5234
چرا زمان نصب متاسپلویت ارور میدهدGem::Ext::BuildError: ERROR: Failed to build gem native extension؟ |
Running Bundler < v2.3.4 on Ruby v3.1 generates `DidYouMean::SPELL_CHECKERS.merge!` deprecation warning. This removes the warning by bumping Bundler to the latest version, as suggested in rubygems/rubygems#5234
for me, I changed the ruby version from |
this tipped me to updating thor: |
by bundle update --bundler rubygems/rubygems#5234
We are seeing the following warning `Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.` described in this issue rubygems/rubygems#5234. Update bundler by running `bundle update --bundler` aso that we no longer see the warning.
This gets rid of a warning: rubygems/rubygems#5234
We are seeing the following warning `Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.` described in this issue rubygems/rubygems#5234. Update bundler by running `bundle update --bundler` aso that we no longer see the warning.
Describe the problem as clearly as you can
Looks like any lockfile with a Bundler version below 2.3.3 (and recent enough to include the offending code) will print the
warning when using Ruby 3.1 that ships with
did_you_mean
1.6.1 that has deprecated access toDidYouMean::SPELL_CHECEKRS
I see this has been addressed by 1074771 but is there anything that can be done for old versions? I guess this is a side-effect of the automatic bundler version switching introduced in Bundler 2.3.
Maybe Bundler should always print something when auto-switching? Then it would be a bit more obvious why you see the deprecation message (and it is probably useful in other scenarios too).
Post steps to reproduce the problem
What were you expecting to happen?
No warning printed.
What actually happened?
Warning printed.
The text was updated successfully, but these errors were encountered: