Discussion: Multi-Dependencies, especially ActiveSupport #824

Closed
skade opened this Issue Apr 3, 2012 · 14 comments

Comments

Projects
None yet
5 participants
Member

skade commented Apr 3, 2012

#822 describes a case for relaxing Padrinos dependency on ActiveSupport. To realize this, the active_support dependency must move out of the gemspec into the (generated) Gemfile.

The bigger thing is that it means that we have to decide on a way to test multiple dependency sets.

state_machine uses appraisal (see https://github.com/pluginaweek/state_machine for a huge example) for this, is this an option?

Member

skade commented Apr 3, 2012

For discussion purposes, I did a quick and dirty code spike:

https://github.com/padrino/padrino-framework/tree/spike/appraisal

Usage:

bundle install
bundle exec rake appraisal:install
bundle exec rake appraisal

This will run all tests with activesupport 3.0,3.1 and 3.2.

Advantages:

  • Allows us to have one Gemfile per test configuration
  • Allows us to test against multiple versions of libraries that we provide integration for

Disadvantages:

  • No group combining. So no testing of DataMapper(1.0,1.1,1.2) together with all combinations of ActiveSupport. (I am not sure whether this is not actually an advantage. It keeps the matrix from exploding.)
  • No Gemfile groups and platform group blocks are taken into account. This is a known deficiency of appraisal. For single gems, this can be used:
gem "foobar", :platform => :jruby
gem "barfoo", :group => :cache

All tests pass as before.

skade closed this Apr 3, 2012

skade reopened this Apr 3, 2012

Member

skade commented Apr 18, 2012

Any opinions on this? @DAddYE

Member

skade commented Jun 21, 2012

As this seems to be scheduled for 0.10.8, whats the opinion on the actual proposed solution? /cc @DAddYE

Owner

DAddYE commented Aug 7, 2012

Ok, let's go, we can try it

We should be testing against the AS edge too ?

Padrino-helpers requires this file:

require 'active_support/core_ext/float/rounding' # round

This file no longer exists in edge active_support. This is making it hard to include edge dependencies in Padrino apps.

Owner

nesquena commented Nov 16, 2012

@lancecarlson Thanks for the report, hopefully we can investigate and fix this soon. Do you happen to know how to include the 'round' functionality in edge now?

I was looking for it and couldn't find it anywhere. Is this a built in feature of 1.9 or something?

Owner

nesquena commented Nov 16, 2012

Good call, in that case just need to rescue if that require fails.

Awesome!! Anyway you can relax the activesupport requirements for padrino-core too?

Going to provide a commit for this.

Couldn't figure out how to reference the commit. Here it is:

lancecarlson/padrino-framework@4591443

bump. ^

Member

dariocravero commented Jan 31, 2013

Closing this since @skade's patch on #1003 was already merged.

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