{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler-features/issues/4","labels_url":"https://api.github.com/repos/bundler/bundler-features/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler-features/issues/4/comments","events_url":"https://api.github.com/repos/bundler/bundler-features/issues/4/events","html_url":"https://github.com/bundler/bundler-features/issues/4","id":17893978,"number":4,"title":"Support cross-platform development","user":{"login":"xaviershay","id":1714,"avatar_url":"https://avatars.githubusercontent.com/u/1714?v=3","gravatar_id":"","url":"https://api.github.com/users/xaviershay","html_url":"https://github.com/xaviershay","followers_url":"https://api.github.com/users/xaviershay/followers","following_url":"https://api.github.com/users/xaviershay/following{/other_user}","gists_url":"https://api.github.com/users/xaviershay/gists{/gist_id}","starred_url":"https://api.github.com/users/xaviershay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xaviershay/subscriptions","organizations_url":"https://api.github.com/users/xaviershay/orgs","repos_url":"https://api.github.com/users/xaviershay/repos","events_url":"https://api.github.com/users/xaviershay/events{/privacy}","received_events_url":"https://api.github.com/users/xaviershay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2013-08-10T03:59:23Z","updated_at":"2015-02-27T08:24:03Z","closed_at":null,"body":"Simplest statement of problem: Allow windows developers to easily deploy to linux without having to do weird things to their lock file.\r\n\r\nSee https://github.com/bundler/bundler/issues/646 and https://github.com/bundler/bundler/issues/2040 for history, discussion, and some pointers for possible implementation."},"comment":{"url":"https://api.github.com/repos/bundler/bundler-features/issues/comments/76354904","html_url":"https://github.com/bundler/bundler-features/issues/4#issuecomment-76354904","issue_url":"https://api.github.com/repos/bundler/bundler-features/issues/4","id":76354904,"user":{"login":"moeffju","id":14829,"avatar_url":"https://avatars.githubusercontent.com/u/14829?v=3","gravatar_id":"","url":"https://api.github.com/users/moeffju","html_url":"https://github.com/moeffju","followers_url":"https://api.github.com/users/moeffju/followers","following_url":"https://api.github.com/users/moeffju/following{/other_user}","gists_url":"https://api.github.com/users/moeffju/gists{/gist_id}","starred_url":"https://api.github.com/users/moeffju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moeffju/subscriptions","organizations_url":"https://api.github.com/users/moeffju/orgs","repos_url":"https://api.github.com/users/moeffju/repos","events_url":"https://api.github.com/users/moeffju/events{/privacy}","received_events_url":"https://api.github.com/users/moeffju/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T08:24:03Z","updated_at":"2015-02-27T08:24:03Z","body":"@indirect I’m aware of what bundler’s intentions are, but what is the alternative? The current situation is that lots of people develop on a platform that is different from their deployment platform. Ruby as an interpreted language facilitates this, because your Ruby code usually runs no matter what the underlying platform is (with some caveats). Your scenario of “completely different code” running in dev and prod, how often does that really happen? libv8 on linux does the same as libv8 on darwin. It could theoretically generate PNGs of kittens instead, but – why would it? Maybe if you could give an example of a gem that works noticeably different on a different platform, that would be helpful for our understanding.\r\n\r\nThere is a pain point here, and all the suggested workarounds come with their own problems:\r\n\r\n* deleting Gemfile.lock loses most of the benefits of bundler and makes deployments slower, network dependent and potentially brittle;\r\n* having a CI on the target platform overwrite Gemfile.lock seems awfully indeterministic and would mean giving your CI server write access to your repo, which unnecessarily increases attack surface;\r\n* manually editing Gemfile.lock is brittle and does not cover all cases;\r\n* manually downloading the gem for the other platform works pretty much fine and makes the user responsible for testing that the combination works (which the CI would do anyway), but runs the risk of forgetting to update the gem version\r\n* anything else?\r\n\r\nOf all the alternatives, having bundler download and cache the gem for different platforms seems like the most obvious, simplest, and least brittle option. The only failure case here is if a) a gem does wildly different things on different platforms, which afaik is comparatively unlikely, and b) people deploy to a different platform for production without testing the app on that platform first, whether on a CI or through manual QA, which is not a great idea anyway.\r\n\r\nIf people want to shoot themselves in the foot, they will do it no matter whether bundler supports them or not. Adding multi-arch support to bundler at least hands them an unloaded gun pointing away from their body. So my recommendation would be to add an option (`--arch=x,y,z` or `--all-arch`), make it off by default, and document it well. No regression for those who don’t have the problem, a simple, straightforward, and officially sanctioned way to solve the problem for those who do."}}