-
Notifications
You must be signed in to change notification settings - Fork 62
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
conflicting remotes set for packages installed from r-universe via url #727
Comments
I suppose there are some bad consequences of this? |
Mainly this confuses For what it's worth,
The leftover RemoteRef and RemoteSha fields are perhaps awkward, but at least the RemoteUrl field can be used here. |
So you want me to add a |
Btw. it is somewhat weird to use |
At least, I thought that's what the implicit contract was. If
Yeah, I definitely agree. At least in this case it seems like it was done to work around some other issue, but (to me) that issue wasn't well articulated. |
IDK why pak does not add Probably R-universe should not serve packages with these fields, especially since they are incorrect. But anyway, we can work it here. |
I think the intention here is to allow package managers to recover the original package sources if the referenced binary is no longer available on r-universe. That said, might be better to use the typical "git" remote fields for this scenario, or to have r-universe use its own DESCRIPTION fields that it "owns" here -- I'm not sure. |
What is incorrect about them? We specifically add those packages can be rebuilt from the upstream source. The idea is that for renv it should not matter if a package source code was pulled from git directly, or this same exact source was downloaded from a tarball from r-universe. What matters is the upstream git source and commit id. |
I think there is a good chance that it is not intentional, but a side effect of installing/building dependencies from |
It is intentional, see https://ropensci.org/blog/2022/01/06/runiverse-renv/ |
If I install a package from R-universe via E.g. |
This is the way it is intended. R-universe is a proxy for the upstream git repository. It does not matter if a user downloaded the package source from github or a source tarball, as long as the sha is the same. Therefore the I think we need to disambiguate the spec for |
That does not sound good to me. I imagine that a big reason for people to use R-universe is the convenience of the binary builds. If you then send package managers like renv and pak to the source instead of using the CRAN-like repo then you lose this. Then people will get slow builds or even failing builds if system packages are not installed. |
We have different use cases in mind. It is not about fast builds. From a reproducibility standpoint it is important that we formally declare the upstream git repository and commit sha, such that renv can lookup the source, even years later when the cranlike-repo may not be there. That's the way it was designed and has worked for 3 years now. |
So currently all packages in R-universe declare these fields in the DESCRIPTION:
This was modeled after what |
How can you even know that without e.g. the sha in the
Maybe it would be better to use a different set of fields then? These fields were meant to be for internal bookkeeping, they have never been standardized, and they are also changing over time.
This is what
Anyway, pak is going to also set |
When this was added this (3 years ago) we wanted something to declare the upstream source in the DESCRIPTION files such that any client that can lookup or verify the upstream source code from which a package installation or tarball was originally built. Yes we could have reinvented the wheel and make up new field names, but for Would it help anything if I add |
With what? With this issue, no. |
Originally from rstudio/renv#2060.
Try installing
cmdstanr
with:The installed package will have the following remotes set:
The top set of remotes are set on the source package by r-universe; the bottom set are added by
pak
.I'm not sure what the best way to resolve this ambiguity is. Should
pak
updateRemoteUrl
to point at the specific URL requested? (I realize this is duplicating what is set inRemotePkgRef
.)The text was updated successfully, but these errors were encountered: