Skip to content

Only warn about bundled gems when require succeeds #11550

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

Conversation

deivid-rodriguez
Copy link
Contributor

No description provided.

@hsbt
Copy link
Member

hsbt commented Sep 26, 2024

Sorry, my late review. It's reasonable for optional dependencies. But I have another concern.

In my understanding, this PR makes to remove warning with bundled gems like drb, csv etc under the bundler environment. I'm not sure how notice that gems are no longer loaded without Gemfile to users.

@deivid-rodriguez
Copy link
Contributor Author

Hi @hsbt, no problem!

In my understanding, this PR makes to remove warning with bundled gems like drb, csv etc under the bundler environment. I'm not sure how notice that gems are no longer loaded without Gemfile to users.

This PR keeps the warning when the behavior has not yet changed, i.e., it still warns when using csv without including it in the Gemfile in Ruby 3.3. But indeed, once the breaking change happens, it will no longer show the warning reading "csv is not part of the default gems starting from Ruby 3.4.0" after the require fails in Ruby 3.4.

I also don't have a good solution for that.

@hsbt
Copy link
Member

hsbt commented Sep 26, 2024

Thanks for explanation.

I also don't have a good solution for that.

I also don't have that yet. I understood this works correctly during Ruby 3.3.x.

If Ruby 3.2 users upgrade their version to Ruby 3.4 directly in the future. There is no chance to know csv is already bundled gems, not default gems. I concerned that situation.

@deivid-rodriguez
Copy link
Contributor Author

Yep, that's the concern I also have. It may be acceptable, since jumping two versions in a row is not a great practice, but I'm not sure.

@hsbt hsbt merged commit a70adce into ruby:master Sep 27, 2024
108 checks passed
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/only-warn-succesful-requires branch September 27, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants