Skip to content
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

Resolve gem version conflicts with Hyrax v4 #823

Open
2 tasks
bkiahstroud opened this issue Jul 8, 2023 · 2 comments
Open
2 tasks

Resolve gem version conflicts with Hyrax v4 #823

bkiahstroud opened this issue Jul 8, 2023 · 2 comments

Comments

@bkiahstroud
Copy link
Contributor

bkiahstroud commented Jul 8, 2023

Story

Attempting to add Bulkrax to a Hyrax v4 application fails due to gem version errors. Specifically, for the dry-monads and bagit 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:

  • Hyrax: d0bd18b34021e18984b3bb632260722adb8fed26
  • Bulkrax: e6f2cf94730ea7db236a6f3280d3dc3967f5495e

Resolving these errors is the first step in making Bulkrax compatible with Hryax v4 and is blocking many following tasks.

Acceptance Criteria

  • Bulkrax successfully bundles in a Hyrax v4 app
  • Resolutions are backwards-compatible with previous Hyrax versions 2.x and 3.x (if possible)

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 add libxml2-dev to the EXTRA_APK_PACKAGES variables in both Dockerfile and docker-compose-koppie.yml and rebuild the Docker image. See this PR for an example.

  1. Add gem 'bulkrax' to .koppie/Gemfile
  2. Run docker compose -f docker-compose-koppie.yml up
  3. Ensure all containers run with no bundler errors. Visit http://localhost:3001 to make sure the app spins up successfully.

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

@bbpennel
Copy link
Contributor

bbpennel commented Oct 2, 2023

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 dry-rb/dry-transaction@4fbe3ae 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.

@bkiahstroud
Copy link
Contributor Author

This is great, thanks for the info @bbpennel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants