[tech debt] ffi-compiler supports default install extension in lib set to false #8928
Conversation
|
My understading is that this PR is create a We'd need to load the file from rubygems arch specific extension directory for the gem. Se for example the copies installed for json: We'd want to install the wrapper file in the first location, and load the compiled file in the second location from it. However, using a
So the only solution would be that the wrapper library has the same extension as the compiled extension it's replacing, in the case, |
|
Also, note that this change is unrelated to |
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