Closed dazza-codes closed 7 years ago
At first glance, there are some activesupport < 5.1 in these:
hyrax was resolved to 2.0.0.alpha, which depends on
active_attr (~> 0.9.0) was resolved to 0.9.0, which depends on
activesupport (< 5.1, >= 3.0.2)
hyrax was resolved to 2.0.0.alpha, which depends on
active-fedora (>= 11.1.3) was resolved to 11.1.3, which depends on
solrizer (< 5, >= 3.4) was resolved to 4.0.0, which depends on
activesupport
In general, for a gem, hyrax seems to have some complex version dependencies on various hyrda and other gems related to rails or rails components, but not on rails itself, e.g.
$ grep rails hyrax.gemspec
spec.add_dependency 'tinymce-rails', '~> 4.1'
spec.add_dependency 'tinymce-rails-imageupload', '~> 4.0.17.beta'
spec.add_dependency 'font-awesome-rails', '~> 4.2'
spec.add_dependency 'select2-rails', '~> 3.5.9'
spec.add_dependency 'jquery-ui-rails', '~> 5.0'
spec.add_dependency 'flot-rails', '~> 0.0.6'
spec.add_dependency 'almond-rails', '~> 0.1'
spec.add_dependency 'jquery-datatables-rails', '~> 3.4.0'
spec.add_dependency 'clipboard-rails', '~> 1.5'
spec.add_dependency 'rails_autolink', '~> 1.1'
spec.add_dependency 'breadcrumbs_on_rails', '~> 3.0'
spec.add_development_dependency 'rspec-rails', '~> 3.1'
spec.add_development_dependency "factory_girl_rails", '~> 4.4'
spec.add_development_dependency 'rails-controller-testing', '~> 0'
@darrenleeweber just to clarify, by "clean clone," you mean you don't have a Gemfile.lock
yet?
Yes, a clean clone means something like this pseudo-code
cd ...
rm -rf hyrax
git clone {hyrax-repo}
cd hyrax
bundle install
But this bug might be fixed now. I guess the issue really is whether or not hyrax should have a devel-dependency on a range of rails versions. From slack discussions, probably not.
hyrax has a dependencies on railtiles, which currently allows any 5.x. https://github.com/projecthydra-labs/hyrax/blob/master/hyrax.gemspec#L56
railties
always depends on activesupport
, and actionpack
with the same version number as the railties
. https://rubygems.org/gems/railties/versions/5.0.0.1
So it effectively is expressing a dependency, with some requirements (currently 5.x including 5.1) on some parts of rails, although not all.
It's unclear to me what the benefit of avoiding dependency on the other parts of rails are (can hydra work without activerecord? I don't think so. But it doesn't declare a dependency on it). It's unclear to me what the argument, referenced here, would be for making hydra not express dependencies on any parts of Rails. It's unclear to me if hyrax ought to be allowing Rails 5.1 in it's dependency requirements, as it currently does does -- does hyrax actually work on Rails 5.1? (I see it's currently passing travis in master on 5.1, so great; but the dependency would also allow a future rails 5.2, which seems unwise).
If we know that hyrax requires rails to work, and certain versions of rails at that -- isn't that exactly what explicit machine-readable dependencies are for?
It's unclear to me what the benefit of avoiding dependency on the other parts of rails are (can hydra work without activerecord? I don't think so. But it doesn't declare a dependency on it). It's unclear to me what the argument, referenced here, would be for making hydra not express dependencies on any parts of Rails.
Presently there's no dependency on actioncable. So we should either require activerecord and activejob or we should just require rails and be okay with the fact that we're pulling down actioncable and not using it.
does hyrax actually work on Rails 5.1? (I see it's currently passing travis in master on 5.1, so great; but the dependency would also allow a future rails 5.2, which seems unwise).
Yes, Hyrax works with Rails 5.1. If Rails follows semver then we shouldn't have any problem working with Rails 5.2 when it comes out.
If Rails follows semver then we shouldn't have any problem working with Rails 5.2 when it comes out.
Rails does not follow semver, and does release backwards incompat changes in 'minor' releases -- as just about anyone who's upgraded a gem for a rails minor release probably knows! But those are not bugs, rails does not follow semver.
http://guides.rubyonrails.org/maintenance_policy.html
Minor Y
New features, may contain API changes (Serve as major versions of Semver). Breaking changes are paired with deprecation notices in the previous minor or major release.
That is, Rails treats the minor version bump as if it were semver major version bump. And has additional strict deprecation policy that I don't think is covered by semver.
Presently there's no dependency on actioncable. So we should either require activerecord and activejob or we should just require rails and be okay with the fact that we're pulling down actioncable and not using it.
I think almost every other gem that only works with rails takes the later path. Most of them don't actually use actioncable, most of them just declare dependency on 'rails'. There are few downsides to this.
Given what @jrochkind says above, I wonder if we should consider pinning Rails more tightly going forward. Either that or better document the RAILS_VERSION
trick that we get from EngineCart.
Given the ongoing discussion, I'm going to re-title this issue and re-open it under the new title.
Chatted on stand-up today, and @darrenleeweber will close this issue and create a new one to declare rails, rather than railties, as a dependency within Hyrax.