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

take Additional_repositories into account #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ThierryO
Copy link

@ThierryO ThierryO commented Dec 2, 2021

This PR should solve r-universe-org/help#109 directly. The suggested workaround is not longer needed.

@jeroen
Copy link
Member

jeroen commented Dec 2, 2021

I appreciate the suggestion, but the problem is that this makes the repository inconsistent, and therefore the end-user who wants to install packages from your universe won't be able to install that package anymore.

We want to be sure that the user can always do:

install.packages("checklist", repos = "https://inbo.r-universe.dev")

And that means that the dependencies of your package will have to be either on CRAN or in your universe, because install.packages does not take Additional_repositories into account either.

@ThierryO
Copy link
Author

ThierryO commented Dec 2, 2021

Good point.

But what when the package depends on a package we can't add to our universe. E.g. the ladybird package has Additional_repositories: https://inla.r-inla-download.org/R/stable. Adding that package via Remotes: github::inbo/INLA fails on R-universe because it is too large...

Should I try to suggest a patch for utils::install.packages() to handle this?

@jeroen
Copy link
Member

jeroen commented Dec 3, 2021

Should I try to suggest a patch for utils::install.packages() to handle this?

You could try that, but I doubt r-core will take it.

Maybe we can try to help fix the INLA package. There is no reason the package has to be that huge, it includes a ton of files that are not needed (e.g. binaries for linux and mac in a windows package, etc).

@jeroen
Copy link
Member

jeroen commented Dec 3, 2021

It looks like the latest stable release of INLA is now slightly under 100MB. Maybe if you update https://github.com/inbo/INLA to this version, that will solve your issue?

https://inla.r-inla-download.org/R/stable/src/contrib/INLA_21.11.22.tar.gz

@jeroen
Copy link
Member

jeroen commented Dec 22, 2021

I tried to build INLA from source but I can't get it to work :( The packages that they publish somehow have a mix of win/mac/linux binaries.

Looking at CRAN packages that depend on INLA, none of them have a "hard" dependency (imports) but instead they all seem to use Suggests: INLA such that the package can be built, even when INLA is not available:

Perhaps you can also make INLA a Suggests in ladybird, such that the package can be built without it? But that requires also that you remove the @importFrom INLA and instead replace them with INLA::function() calls in ladybird. This would make ladybird suitable for CRAN as well.

@ThierryO
Copy link
Author

ThierryO commented Feb 9, 2022

I'm trying to move from Imports: INLA to Suggests: INLA. I'm running into problems when a package depends on another package that also uses Suggests: INLA. See https://stat.ethz.ch/pipermail/r-package-devel/2022q1/007715.html for a more elaborate description of the problem.

@jeroen, do you have suggestions to fix this?

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