{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler-features/issues/82","labels_url":"https://api.github.com/repos/bundler/bundler-features/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler-features/issues/82/comments","events_url":"https://api.github.com/repos/bundler/bundler-features/issues/82/events","html_url":"https://github.com/bundler/bundler-features/issues/82","id":59725693,"number":82,"title":"[feature suggestion] Gemfile overrides gem dependencies, pessimistic dependency resolver","user":{"login":"ajgrover","id":3088615,"avatar_url":"https://avatars.githubusercontent.com/u/3088615?v=3","gravatar_id":"","url":"https://api.github.com/users/ajgrover","html_url":"https://github.com/ajgrover","followers_url":"https://api.github.com/users/ajgrover/followers","following_url":"https://api.github.com/users/ajgrover/following{/other_user}","gists_url":"https://api.github.com/users/ajgrover/gists{/gist_id}","starred_url":"https://api.github.com/users/ajgrover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajgrover/subscriptions","organizations_url":"https://api.github.com/users/ajgrover/orgs","repos_url":"https://api.github.com/users/ajgrover/repos","events_url":"https://api.github.com/users/ajgrover/events{/privacy}","received_events_url":"https://api.github.com/users/ajgrover/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-03T23:36:11Z","updated_at":"2015-03-04T00:38:38Z","closed_at":null,"body":"Hi all - \r\n\r\n@sxl1092, @bgott, @rrperez and I are 4 Stanford students working on Rails through [Facebook OpenAcademy](https://www.facebook.com/notes/facebook-engineering/facebook-open-academy-bringing-open-source-to-cs-curricula/10151806121378920) for our respective senior projects for school. As our project, we were given the suggestion to propose 2 new features to Bundler that would be useful to the Rails team. We are exploring if the best way to do this would be through code merged into the Bundler core or as a plugin but wanted to get your feedback before we started. \r\n\r\nFirst off, it would be useful to have a pessimistic dependency resolver: something like `bundle install --use-oldest` that would install the oldest possible version of all gems. This would allow us to test to ensure that we are not accidentally using newer versions of gems that may not be compatible with those declared in the Gemfile. That way, we would know and be able to bump the version declared in the Gemfile to match ones that will not break existing code.\r\n\r\nSecondly, the ability for a Gemfile to override conflicting dependencies of a gem it is installing. For example, the activesupport gem depends on i18n '~> 0.7'. That means Bundler will refuse to continue if we have another gem, which depends on (a theoretical) i18n 1.0 (because '~> 0.7' is equivalent to '>= 0.7, < 1.0').\r\n\r\nWhile that's reasonable in general (the newer i18n may indeed be incompatible), it's a pain for testing. (Or, if the new version actually is compatible for our purposes, if the maintainer of activesupport is slow in publishing a new release that declares 1.0 okay.)\r\n\r\nSo, it would be nice if we could add something to our application's Gemfile, which would tell Bundler that we, as the application author, acknowledge that we're asking it to install two incompatible gems, and we'll take responsibility for the consequences.\r\n\r\n```ruby\r\noverride_dependency 'activesupport', 'i18n', '>= 0.7, < 2.0'\r\n```\r\n\r\n\r\nThanks in advance for listening to our suggestions and we look forward to hearing your advice on the best way to proceed."},"comment":{"url":"https://api.github.com/repos/bundler/bundler-features/issues/comments/77074087","html_url":"https://github.com/bundler/bundler-features/issues/82#issuecomment-77074087","issue_url":"https://api.github.com/repos/bundler/bundler-features/issues/82","id":77074087,"user":{"login":"indirect","id":78,"avatar_url":"https://avatars.githubusercontent.com/u/78?v=3","gravatar_id":"","url":"https://api.github.com/users/indirect","html_url":"https://github.com/indirect","followers_url":"https://api.github.com/users/indirect/followers","following_url":"https://api.github.com/users/indirect/following{/other_user}","gists_url":"https://api.github.com/users/indirect/gists{/gist_id}","starred_url":"https://api.github.com/users/indirect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indirect/subscriptions","organizations_url":"https://api.github.com/users/indirect/orgs","repos_url":"https://api.github.com/users/indirect/repos","events_url":"https://api.github.com/users/indirect/events{/privacy}","received_events_url":"https://api.github.com/users/indirect/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T00:38:38Z","updated_at":"2015-03-04T00:38:38Z","body":"Hi Alex. I'm not entirely clear on your explanation of why you want the \"use oldest\" feature. Can you give a concrete example of a situation where you would use it?\r\n\r\nForcibly overriding dependencies is a feature that gets asked for on occasion, but so far we have decided against it every time it has come up. It adds complexity, indirection, and \"magic\" to the way that gemspecs work. It's also (relatively) straightforward to fork a gem repo, edit the gemspec, and then use that git repo while waiting for a gem author to release an updated gem, and so we have recommended that instead."}}