-
Notifications
You must be signed in to change notification settings - Fork 124
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
Change the fake mechanism to be compatible with bundler. #121
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The previous fake mechanism worked by hooking onto the "require 'rbconfig'" call. This is problematic because bundler internally requires rbconfig, but doesn't work corretly in a faked environment. It then fails to load gems that are also part of the standard library, like json and rdoc. This results in issues like rake-compiler/rake-compiler-dock#8 The fake mechanism is now changed to hook onto the "require 'mkrb'" call, which is typically part of the extconf file, and it is where the faked platform values are actually needed. That way it is loaded after bundler/setup, so that the library paths are set according to the Gemfile.lock, to the native Linux libraries, before the fake environment is active. Please note, that the build directory of a given gem needs to be cleared, in order to get updated fake files. So do a "rm tmp pkg -rf".
This was referenced Jan 30, 2016
kou
added a commit
that referenced
this pull request
Jan 31, 2016
Change the fake mechanism to be compatible with bundler. Patch by Lars Kanis. Thanks!!!
Thanks! Should we release a new version? |
This change breaks some existing tests. Could you confirm them?:
|
These changes are intended, but I didn't know, that there are tests about
them. Sorry - I'll fix this!
|
I've adjusted the specs per commit af31388 and pushed it directly on master. A new release version would be fine! |
Sorry... I forgot to release a new version... |
Thank you!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The previous fake mechanism worked by hooking onto the "require 'rbconfig'" call. This is problematic because bundler internally requires rbconfig, but doesn't work corretly in a faked environment. It then fails to load gems that are also part of the standard library, like json and rdoc. This results in issues like rake-compiler/rake-compiler-dock#8
The fake mechanism is now changed to hook onto the "require 'mkrb'" call, which is typically part of the extconf file, and it is where the faked platform values are actually needed. That way it is loaded after bundler/setup, so that the library paths are set according to the Gemfile.lock, to the native Linux libraries, before the fake environment is active.
Please note, that the build directory of a given gem needs to be cleared, in order to get updated fake files. So do a "rm tmp pkg -rf".
This patch is already in rake-compiler-dock-0.5.1. See commit rake-compiler/rake-compiler-dock@1e2fb4e