-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix platform issues when running under a frozen bundle #3909
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
deivid-rodriguez
force-pushed
the
platform_issues
branch
from
August 29, 2020 16:45
3999176
to
9d97f31
Compare
In the case of running under jruby, on a frozen bundle, and against a lockfile only including the ruby platform, `expand_dependencies` would end up filtering out all dependencies, causing errors. The reason is that on a frozen bundle, the local platform is not added to the array of definition platforms, since only platform information from the lockfile should be used. That means that under the previous logic, `expand_dependencies` would filter out everything. The solution is to make sure to always _at least_ expand all dependencies with the local platform.
deivid-rodriguez
force-pushed
the
platform_issues
branch
from
September 1, 2020 16:44
9d97f31
to
b475adf
Compare
I'll merge this. @headius if you have time to verify the fix, try out the default branch and we can address any issues post-merge. |
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 5, 2020
Fix platform issues when running under a frozen bundle (cherry picked from commit 0ab446f)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 5, 2020
Fix platform issues when running under a frozen bundle (cherry picked from commit 0ab446f)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 5, 2020
Fix platform issues when running under a frozen bundle (cherry picked from commit 0ab446f)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 6, 2020
Fix platform issues when running under a frozen bundle (cherry picked from commit 0ab446f)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 6, 2020
Fix platform issues when running under a frozen bundle (cherry picked from commit 0ab446f)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 6, 2020
Fix platform issues when running under a frozen bundle (cherry picked from commit 0ab446f)
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.
What was the end-user or developer problem that led to this PR?
In the case of running under jruby, on a frozen bundle, and against a lockfile only including the ruby platform,
expand_dependencies
would end up filtering out all dependencies, causing errors.The reason is that on a frozen bundle, the local platform is not added to the array of definition platforms, since only platform information from the lockfile should be used. That means that under the previous logic,
expand_dependencies
would filter out everything.What is your fix for the problem, implemented in this PR?
The solution is to make sure to always at least expand all dependencies with the local platform.
Note that it should still be preferred to "unfreeze" the application, and rebundle using jruby, so that platform specific dependencies are picked up. But if the desired to use only pure ruby versions of dependencies, this changes gets that case working too without weird errors.
Fixes #3874.
Tasks:
I will abide by the code of conduct.