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 fileutils double load when using bundler/inline #3991

Merged
merged 1 commit into from Oct 14, 2020

Commits on Oct 12, 2020

  1. Lazily load fileutils

    We need inline gemfiles to not load `fileutils`. If it does, a require
    of `fileutils` after a `gemfile(true)` block might cause redefinition
    warnings because the initial require will use "rubygems version of
    require", which "upgrades default gems", whereas the second require will
    use the default version of `fileutils`, since bundler "undoes" rubygems
    require monkeypatches.
    
    Similar to other default gem issues, the solution is a mix of:
    
    * Lazily loading `fileutils` as much as possible.
    * Vendor `tmpdir` inside `bundler`. Since `tmpdir` loads `fileutils`
      internally, by vendoring it we can change this require to instead use
      bundler's vendored version of fileutils, which is namespaced so it
      doesn't cause any redefinition issues.
    deivid-rodriguez committed Oct 12, 2020
    Copy the full SHA
    d781931 View commit details
    Browse the repository at this point in the history