[tech debt] ffi-compiler supports default install extension in lib set to false #8928
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.
What was the end-user or developer problem that led to this PR?
Closes
It was premature to deprecate
Gem.install_extension_in_lib == truewhen we have not even yet changed libraries that could break when the path changes to ext/@deivid-rodriguez suggestion was
"While I think explicit deprecation of Gem.install_extension_in_lib == true is great, I believe the issue is more that some gems actually rely on the compiled extension being placed in the lib folder to work, so once we toggle the default, they will break. If I recall correctly, the problem was gems using ffi-compiler.
So my idea was to:
Figure out what ffi-compiler should be doing instead to play nice with RubyGems.
Propose that change to ffi-compiler.
Figure out how to warn other cases we may be missing, and cases where an old version of ffi-compiler not including our fix is used.
One potential idea I just had is to temporarily keep installing a wrapper file into lib that warns and then loads the extension from the proper location."
This PR includes the work related to this part in specific.
"One potential idea I just had is to temporarily keep installing a wrapper file into lib that warns and then loads the extension from the proper location."
What is your fix for the problem, implemented in this PR?
install with
extension_in_liboption will add ruby wrapper file includingext/folder pathMake sure the following tasks are checked