Open bkiahstroud opened 1 year ago
For what its worth, my understanding is that hyrax 4 only requires ruby >= 2.7, but their test matrix tests through 3.2. Hyrax 5 does require 3.2 though.
For our local repository, forking bulkrax and changing to s.add_dependency 'dry-monads', '~> 1.5.0'
seems to resolve dependency issues when including bulkrax 5.3.0 in a hyrax 4 based repository using ruby 2.7 (oddly 5.2.1 did not have problems being included in the hyrax 4 based repo). Of course all the tests fail in bulkrax due with uninitialized constant Dry::Monads::Result::Transformer
. I get the impression that dry-transactions v0.15.0 is supposed to resolve this issue https://github.com/dry-rb/dry-transaction/commit/4fbe3aea30e4293fceba74c6204ec82d993957e6 but if I set that in bulkrax then bundle update
spins forever.
In actual usage in our hyrax 4 repository, Bulkrax seems to be functioning and I'm able to do a a csv based import of several dozen works, and then export it.
It also looks like since this issue was opened, the official bagit gem has released an update (0.4.6) with ruby 3.2 support.
This is great, thanks for the info @bbpennel!
Story
Attempting to add Bulkrax to a Hyrax v4 application fails due to gem version errors. Specifically, for the
dry-monads
andbagit
gems.dry-monads error message
``` Could not find compatible versions Because every version of bulkrax depends on dry-monads ~> 1.4.0 and every version of hyrax depends on dry-monads ~> 1.5, every version of bulkrax is incompatible with hyrax >= 0. So, because Gemfile depends on hyrax >= 0 and Gemfile depends on bulkrax >= 0, version solving has failed. ```bagit error message
``` Your bundle is locked to bagit (0.4.6) from rubygems repository https://rubygems.org/ or installed locally, but that version can no longer be found in that source. That means the author of bagit (0.4.6) has removed it. You'll need to update your bundle to a version other than bagit (0.4.6) that hasn't been removed in order to install. ```These errors occurred on the following versions:
d0bd18b34021e18984b3bb632260722adb8fed26
e6f2cf94730ea7db236a6f3280d3dc3967f5495e
Resolving these errors is the first step in making Bulkrax compatible with Hryax v4 and is blocking many following tasks.
Acceptance Criteria
Testing Instructions
NOTE: These instructions assume you will be using Hyrax's
.koppie
app. They should apply to any Hyrax v4 app, but if you aren't using.koppie
, you may need to slightly modify some of the commands._NOTE: If using
.koppie
for testing purposes, you will need to addlibxml2-dev
to theEXTRA_APK_PACKAGES
variables in bothDockerfile
anddocker-compose-koppie.yml
and rebuild the Docker image. See this PR for an example._gem 'bulkrax'
to.koppie/Gemfile
docker compose -f docker-compose-koppie.yml up
Notes
The official bagit gem does not support Ruby 3.2, which Hyrax v4 requires. I found a fork that does support Ruby 3.2:
If this fork is used, testing should be done to ensure the Bagit importer still works as expected.
Related conversation in Slack: https://samvera.slack.com/archives/C03S9FS60KW/p1688779291516519