Skip to content

Commit

Permalink
only depend on specific components of linkeddata being used
Browse files Browse the repository at this point in the history
To avoid dependency conflicts with sub-dependencies of linkeddata not being used. linkeddata is a meta gem that just aggregates a bunch of linked data-related gems.

We still aren't sure why these linkeddata gems have historically been listed as development-only dependencies instead of runtime dependencies. See #375
  • Loading branch information
jrochkind committed Sep 8, 2022
1 parent 2ddec23 commit ab1d5ae
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
11 changes: 10 additions & 1 deletion qa.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rails', '!=5.2.0', '!=5.2.1', '!=5.2.2'
s.add_development_dependency 'byebug'
s.add_development_dependency 'engine_cart', '~> 2.0'
s.add_development_dependency 'linkeddata'

# Not sure why these RDF-related gems are only being listed as development dependencies
# not general runtime dependencies...
# ... maybe meant to be optional dependencies only if you are using related
# func? See also the "meta" gem `linkeddata` which includes all of these deps.
s.add_development_dependency 'rdf-n3', '~> 3.0'
s.add_development_dependency 'rdf-rdfxml', '~> 3.0'
s.add_development_dependency 'json-ld', '~> 3.0'
s.add_development_dependency 'rdf-vocab', '~> 3.0'

s.add_development_dependency 'pry'
s.add_development_dependency 'pry-byebug'
s.add_development_dependency 'rspec-rails'
Expand Down
8 changes: 7 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
require 'linkeddata'
# Not sure why these RDF-related gems are only being used in CI and not general
# dependencies... maybe meant to be optional dependencies?
require 'rdf/n3'
require 'rdf/rdfxml'
require 'json/ld'
require 'rdf/vocab'

require 'json'
require 'engine_cart'
require 'byebug' unless ENV['TRAVIS']
Expand Down
9 changes: 0 additions & 9 deletions spec/test_app_templates/Gemfile.extra
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ group :development do
#
if ENV['RAILS_VERSION'] && Gem::Version.new(ENV['RAILS_VERSION']) < Gem::Version.new("6.1")
gem 'psych', '< 4'

# Some versions of linkeddata dependency depend on yaml-ld gem... yaml-ld 0.0.1
# has a dependency on psych 4.x specifically, conflicting with above, bundler
# seems to be having trouble resolving to yaml-ld 0.0.2 on it's own.
# We don't actually depend on yaml-ld at all ourselves, just trying
# to help bundler resolve a tree that works.
#
# https://github.com/ruby-rdf/linkeddata/issues/16#issuecomment-1239912981
gem 'yaml-ld', ">= 0.0.2"
end

if ENV['RAILS_VERSION'] =~ /^6\.1\./ && ENV['RUBY_VERSION'] =~ /^3\.1\./
Expand Down

0 comments on commit ab1d5ae

Please sign in to comment.