Skip to content

feature request: allow me to not specify a platform, allow bundler to always use the fallback behavior #9472

@jjb

Description

@jjb

First of all, thank you for bundler! It's by far the best package manager I've ever used, whenever I'm in another ecosystem I miss bundler 🫶

Problem

In our large Gemfile for a many-years old successful product, we only have the ruby platform specified. We use a handful of gems which support multiple platforms, and we benefit from bundler's behavior of falling back to the local platform when doing an install (right?). So far so good.

We have now encountered our first gem that has no ruby variant. (email me for which one it is if interested). So, if we want to install it, we need to remove the ruby platform and add all our specific platforms. Theoretically this is fine, but can introduce problems in the future with developer confusion when adding new gems, or maybe someone is working on a new platform (unlikely but possible).

Another option is to ask the gem maintainer to distribute a "dummy" ruby variant to facilitate bundler users who want to just depend on the fallback at install time. I believe some gems we use already do this, but I may be wrong, maybe they have legit ruby variants.

The fact that the fallback behavior at install time works so well (or maybe there are risks/drawbacks I'm not aware of) really confuses me about the goals of the platform system. Every time I have asked around about this in slack groups and such, I get the same confusion about what the goals are, from other very experienced engineers.

Solution

Allow me to specify in Gemfile.lock that I want bundler to always use the fallback logic and install local platform specific gems, and i don't want to specify any platforms in my lockfile

bundle lock --add-platform auto

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