Simplify nested gem activation exceptions #3450
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
In #3445, I noticed after removing minitest's load rescue, that the activation error you get when you try to run the tests without having the right minitest version is really verbose, way too much than I would have expected. See:
We get the same exception like... 4 times!!
So I decided to investigate why.
My conclusion is that this is a bug in our custom require.
I fixed it by removing the condition to retry the
require
and all tests (plus my regression test) still seem to pass. I also digged into history. It was introduced in c1fd10d with commit message saying "Fixed gem loading issue caused by dependencies not resolving.", but no further explanation of what the actual issue was nor any regression tests or anything. So... 🤷♂️.I also made some experiments while trying to understand our full custom require, but couldn't find anything that this could break.
I plan to dig a bit more tomorrow, but I wanted to check with other devs and CI too.
Tasks:
I will abide by the code of conduct.