insightsengineering / verdepcheck

An R package that tests your R package against the min/max versions of specified dependencies
https://insightsengineering.github.io/verdepcheck/
Other
6 stars 0 forks source link

[Discussion/Question]: How to deal with indirect dependencies that are not on CRAN #38

Open averissimo opened 11 months ago

averissimo commented 11 months ago

What is your question?

Example

Context:

For an actual case, pkg.a is teal.modules.clinical, pkg.b is teal.slice and pkg.c is teal.data

Outcome

Solutions

  1. Add entry for Config/Needs/verdepcheck of pkg.a to serve as hint on where to find pkg.c
    • Right now it discards any entry that is not on Depends/Imports/Suggests
    • We could use optional flag to enable this behavior
  2. Re-add Remotes section to insightsengineering packages
    • Needs research how to mitigate issue with R-Universe
  3. Wait until pkg.c is released on CRAN
    • teal.data should be released in next few months

Code of Conduct

Contribution Guidelines

averissimo commented 11 months ago

(moving discussion from chat to issue @pawelru)

I've already tested a solution of 1.: That would create some clutter.

However, there's a positive side-effect as it would make the max strategy more effective, as it would use pkg.c/teal.data development version.

pawelru commented 11 months ago

I personally leaning towards 2. This would be a clean solution because something wrong is with pkg.b hence any fixes needs to be done there.

I have some bad feeling about 1 as this would break encapsulation. I don't want people to specify all indirect deps there. On the other hand, we can change the behaviour in a way that the entry will be used on a match with any (!) of all (!) dependencies (currently it is used on a match with direct dependencies only). I see the value (not to mention max strategy as you pointed out) but this is quite a messy logic to be honest. If done, this needs to be very well documented.