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
Leverage ruby feature to warn when requiring default gems not included in the bundle that will be turned into bundled gems in the future #6831
Conversation
|
@hsbt I think we could just include the same Of the 3.4 gems, only two have extensions: nkf, which we've fixed in ruby/nkf#15, and syslog, which JRuby provides with FFI (we should get that into the gem). I think they all would be good for warnings. |
What was the end-user or developer problem that led to this PR?
When users load
rexml
after upgrading Ruby version, they gotLoadError
ofrexml
. Becauserexml
is now bundled gems, not default gems that is shipped with underRbConfig::CONFIG["rubylibdir"]
.I want to eliminate this surprised situation.
What is your fix for the problem, implemented in this PR?
I added warning feature for bundled gems and default gems. When users did load default gems that are listed on our plan of bundled gems, we can notice to them.
Notification message is like this.
and I also notice bundled gems like this:
I believe this feature is helpful for Bundler users.
also see https://bugs.ruby-lang.org/issues/19776
TODO
I didn't implement to notice about gemspec. If
foo
gem depends oncsv
intenally, This PR warns only aboutcsv
andGemfile
. We should also warn aboutfoo.gemspec
.Make sure the following tasks are checked