Skip to content

Reconsider linkeddata dependency #375

@jrochkind

Description

@jrochkind

the linkeddata gem has given us periodic dependency tree challenges. Eg #374 (comment). Could/should the way we are using it be changed?

  1. linkeddata gem is expressed as a development-only dependency, not a full runtime dependency.

    s.add_development_dependency 'linkeddata'

    • Normally this would mean the gem is not used by actual production code, but is only used in, say, CI. But I don't think this is actually true of linkeddata.
    • Is it done this way intending it to be a kind of "optional dependency"? That a local app will have to add themselves iff they are using certain features? If so this should be documented and specified, and consideration given for:
      • Additional code to require the "optional" dependency explicitly such that you get a better error message if trying to use the features that require it, including version requirements. eg https://bibwild.wordpress.com/2015/09/09/optional-gem-dependencies/
      • OR extract the adapters that do use linkeddata into their own separate gem, with an explicit linkeddata (or other, see below) dependency?
  2. linkeddata is mean to be an aggregate gem. Can we instead require/depend on just hte parts we actually use?

    • linkeddata maintainer writes:

      The linkeddata gem is specifically intended to be a meta-release that requires all the various gems in the eco-system. This undoubtedly includes many not necessary for every application. Consider requiring the specific gems you need directly, which will also significantly reduce your image size, if that's important.

    • I would say it's not just an issue of image size, it's an issue of reducing transitive dependencies to reduce possible dependency conflicts (as happened above with a confict involving yaml-ld, a dependency of linkeddata whose functions we aren't even using).
    • This would reuqire figuring out what individual specific gems we are actually using here, and how. This may be knowledge currently not in our institutional knowledge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions