Skip to content
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 bundler/inline not skipping installation when gems already there, when used more than once #6305

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

tbates-redarc
Copy link
Contributor

@tbates-redarc tbates-redarc commented Jan 24, 2023

What was the end-user or developer problem that led to this PR?

Using bundler/inline multiple times causes gems mentioned in the second and subsequent uses to be reinstalled on every invocation, even if they were already installed.

What is your fix for the problem, implemented in this PR?

  • Added tests to show the problem.
  • Added a call to Bundler.reset! to gemfile method which fixes the problem, but I am not sure if this is the correct approach.
  • I had another problem that I can't work out how to write a test for, where extensions were not being compiled correctly when installed in this manner. Wrapping the body of the gemfile method in Bundler.with_unbundled_env fixed it. (Moved to Fix bundler/inline not properly installing gems with extensions when used more than once #6306)

Make sure the following tasks are checked

@deivid-rodriguez
Copy link
Member

Thanks for fixing these things! Can you move the fix related to extensions to a separate PR? That way we can ship the first fix which seems ready to go with a test, and then focus on reproducing/fixing the other issue.

@tbates-redarc
Copy link
Contributor Author

Moved second commit to #6306 and fixed unit tests.

Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@deivid-rodriguez deivid-rodriguez changed the title Inline reinstall fix Fix bundler/inline not skipping installation when gems already there, when used more than once Jan 27, 2023
@simi simi merged commit a9c9ea2 into rubygems:master Jan 27, 2023
@tbates-redarc tbates-redarc deleted the inline-reinstall-fix branch January 29, 2023 23:42
deivid-rodriguez pushed a commit that referenced this pull request Jan 31, 2023
Fix `bundler/inline` not skipping installation when gems already there, when used more than once

(cherry picked from commit a9c9ea2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants