You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This topic originated in #789 but will be continued here. 'Local package' means a package compiled and installed from a local source directory (not by renv) - regardless of whether that package is also present in a repository.
Even though the local package may be in a different dev state than the versions available in one of the active Repositories, @kevinushey explained (#789 (comment)) it is intended behaviour of renv to link the local package with an available Repository in renv.lock, if applicable.
In that regard three related aspects may profit from further improvement (we could split this in more issues if needed):
1. In the case of a r-universe repository there is some inconsistency in renv.lock (and related output of renv::snapshot()):
local packages get the Repository name as the value for their Repository key. This is consistent with the case for packages installed from CRAN and their local counterparts.
packages effectively installed from a r-universe repository, get the Repository URL as value for their Repository key
Regarding how the 'inbo' r-universe is depicted in two different ways, I was referring to the difference between packages INBOtheme and n2khab in the output of renv::init():
# https://inbo.r-universe.dev ======== ## THIS LINE
- INBOtheme [* -> 0.5.9]
versus
# inbo =============================== ## THIS LINE
- n2khab [* -> 0.5.0.900]
Sure it is not wrong, it's just not 100% consistent; I'd expect either the name or the URL in both cases.
2. In contrast with renv 0.14.0, renv 0.14.0-50 does no longer complain when registering a package that cannot be linked to a known Repository - instead the Repository gets value null and no further messaging occurs.
So a local package is now always set as coming from a repository, here being the 'null' repository (before, it would have been source 'unknown', not considered as coming from a repo).
In this case no warning came anymore from snapshot() (which now reports this package under # Repository ========) or status().
==> Suggestion: should a warning not have been risen, as it was in 0.14.0? - see below
3. It could be argued that renv should always warn the user when registering a local package, since it can be in a different state than the version available in a Repository.
The text was updated successfully, but these errors were encountered:
IMO there's relatively little more we can do for locally installed packages because we have to guess where they come from. I think there are real dangers to making the existing heuristics more powerful instead of encouraging people to install packages in a way that gives a full specification of their source.
This topic originated in #789 but will be continued here. 'Local package' means a package compiled and installed from a local source directory (not by
renv
) - regardless of whether that package is also present in a repository.Even though the local package may be in a different dev state than the versions available in one of the active Repositories, @kevinushey explained (#789 (comment)) it is intended behaviour of
renv
to link the local package with an available Repository inrenv.lock
, if applicable.In that regard three related aspects may profit from further improvement (we could split this in more issues if needed):
1. In the case of a r-universe repository there is some inconsistency in
renv.lock
(and related output ofrenv::snapshot()
):Repository
key. This is consistent with the case for packages installed from CRAN and their local counterparts.Repository
keyExamples (partly from #789)
From #789 (comment):
2. In contrast with
renv
0.14.0,renv
0.14.0-50 does no longer complain when registering a package that cannot be linked to a known Repository - instead theRepository
gets valuenull
and no further messaging occurs.Details (copied from #789)
Both below cases only have the CRAN repo enabled (
options(repos = c(CRAN = "https://cloud.r-project.org/"))
).with
renv
0.14.0-50 (github):This locally built package (which is not on CRAN, only in the inbo r-universe repo = disabled in this session) is now stored like:
So a local package is now always set as coming from a repository, here being the 'null' repository (before, it would have been source 'unknown', not considered as coming from a repo).
In this case no warning came anymore from
snapshot()
(which now reports this package under# Repository ========
) orstatus()
.==> Suggestion: should a warning not have been risen, as it was in 0.14.0? - see below
with
renv
0.14.0 (CRAN):Local package registered as:
Where warnings occurred:
3. It could be argued that
renv
should always warn the user when registering a local package, since it can be in a different state than the version available in a Repository.The text was updated successfully, but these errors were encountered: