Skip to content

Activate default gem without compilation with bundler #8423

@YO4

Description

@YO4

Thanks to #8412, it makes default gem visible when bundle install --prefer-local.
It has made progress but does not help my situation #8265, I think I have narrowed down the problem and would like to explain it.

If I understand correctly, when bundle install --prefer-local, default gems are taken into account in dependency resolution, but gem install process seems to be handled normally.

The problem is that the compilation process of the extension library also runs at this time.
This will fail in environments where the compiler does not exist, so the default gem is not seems to be utilized.
In practice, the default gem is available because that is a default gem, but it is not ideal for bundle install to fail.

For example, if fiddle is added to a dependency to accommodate fiddle becoming the default gem, this will cause problems when using ruby from a binary distribution.
I believe this is unavoidable since gemspec dependencies cannot be switched between ruby versions.
The need for a compiler may unnecessarily complicate container preparation and using ruby on Windows.
Of course, the time required for compilation is also a negative factor. Remember how slow compiling is on Windows!

Would it be possible to treat gem install of the same version of the default gem as a special case and provide an option to skip the actual installation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions