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

Reconsider linkeddata dependency #375

Open
jrochkind opened this issue Sep 8, 2022 · 1 comment
Open

Reconsider linkeddata dependency #375

jrochkind opened this issue Sep 8, 2022 · 1 comment

Comments

@jrochkind
Copy link
Contributor

jrochkind commented Sep 8, 2022

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.
jrochkind added a commit that referenced this issue Sep 8, 2022
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
jrochkind added a commit that referenced this issue Sep 8, 2022
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
jrochkind added a commit that referenced this issue Sep 8, 2022
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
@jrochkind jrochkind mentioned this issue Sep 8, 2022
jrochkind added a commit that referenced this issue Sep 8, 2022
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
@jrochkind
Copy link
Contributor Author

jrochkind commented Sep 8, 2022

OK, we may actually switch the development dependency from linkeddata to specific sub-dependencies, in order to resolve a problem we had with bundler failing to be able to resolve a consistent dependency tree, see #374, and specifically 5dcf7f5 for which specific sub-dependencies I identified as necessary for tests to pass.

The outstanding issue still is... what are downstream apps supposed to be doing, are they supposed to be adding linkeddata or sub-dependencies to their own Gemfile as "optional" dependencies for certain features or adapters, and if so which ones?

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

1 participant