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

Work with Multiple Version Constraints #930

Closed
josephholsten opened this Issue Jan 10, 2011 · 6 comments

Comments

Projects
None yet
6 participants
@josephholsten

I'd like it if bundler could make sense of constraints like

gem 'factory_girl', '~>1.3.0'
gem 'factory_girl', '1.3.2'

The reason is to make testing with multiple gemfiles work better. I'd like gem authors to place the loose constraint in their gemspec like

Gem::Specification.new do |s|
    s.name        = %q{gemtest}
    s.version     = '0.1'
    s.summary     = %q{test!}

    s.add_runtime_dependency('factory_girl', '~>1.3.0')
end

and then be able to run tests with strict constraints in different gemfiles like

source "http://rubygems.org"
gemspec
gem 'factory_girl', '1.3.0'

and

source "http://rubygems.org"
gemspec
gem 'factory_girl', '1.3.2'

This workflow is driven by how the appraisal gem works, so a different solution to the problem may make more sense.

@Nowaker

This comment has been minimized.

Show comment
Hide comment
@Nowaker

Nowaker Jun 13, 2012

And what about this?

gem 'mongrel', '1.2.0.pre2', :platforms => :ruby_19
gem 'mongrel', '1.1.5', :platforms => :ruby_18

This is terribly funny it doesn't work.

Nowaker commented Jun 13, 2012

And what about this?

gem 'mongrel', '1.2.0.pre2', :platforms => :ruby_19
gem 'mongrel', '1.1.5', :platforms => :ruby_18

This is terribly funny it doesn't work.

@jbbarth

This comment has been minimized.

Show comment
Hide comment
@jbbarth

jbbarth Jul 29, 2012

This would also be very useful for applications such as redmine which evals Gemfile's from plugins. Today if a plugin specifies a gem constraint and an other plugin specifies an other constraint, it fails even if constraints are compatible.

jbbarth commented Jul 29, 2012

This would also be very useful for applications such as redmine which evals Gemfile's from plugins. Today if a plugin specifies a gem constraint and an other plugin specifies an other constraint, it fails even if constraints are compatible.

@patcon

This comment has been minimized.

Show comment
Hide comment
@patcon

patcon Sep 17, 2012

Was this ever resolved in any capacity?

//cc miketheman re: miketheman/knife-role-spaghetti#10

patcon commented Sep 17, 2012

Was this ever resolved in any capacity?

//cc miketheman re: miketheman/knife-role-spaghetti#10

@indirect

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Sep 17, 2012

Member

@patcon, no, no resolution yet. It could probably use some thinking about and more feedback from people who actually want this. Some idea of how many people care would also be good -- in the most common usage of a Gemfile (for a single application), throwing an error when a gem is listed twice is considered a feature instead of a bug.

Member

indirect commented Sep 17, 2012

@patcon, no, no resolution yet. It could probably use some thinking about and more feedback from people who actually want this. Some idea of how many people care would also be good -- in the most common usage of a Gemfile (for a single application), throwing an error when a gem is listed twice is considered a feature instead of a bug.

@patcon

This comment has been minimized.

Show comment
Hide comment
@patcon

patcon Sep 17, 2012

Yeah, I would mostly agree. The only reason it's helpful for us is because Opcode Chef switched to more semver-like versioning mid-major-release :)

Might be able to fix it on their end, in which case it's a non-issue. Will update here regardless

patcon commented Sep 17, 2012

Yeah, I would mostly agree. The only reason it's helpful for us is because Opcode Chef switched to more semver-like versioning mid-major-release :)

Might be able to fix it on their end, in which case it's a non-issue. Will update here regardless

@xaviershay

This comment has been minimized.

Show comment
Hide comment
@xaviershay

xaviershay Aug 10, 2013

Contributor

Patches welcome for discussion, reopen in https://github.com/bundler/bundler-features to continue discussion.

Contributor

xaviershay commented Aug 10, 2013

Patches welcome for discussion, reopen in https://github.com/bundler/bundler-features to continue discussion.

@xaviershay xaviershay closed this Aug 10, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment