-
Notifications
You must be signed in to change notification settings - Fork 154
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
Warning messages on load after upgrading to renv 1.0.0 #1558
Comments
Do you get more detail if you use:
Perhaps by putting this in your project's |
A reproducible example would also help; e.g. if you could share your project sources publicly (e.g. on GitHub). |
Unfortunately I'm not able to share the whole project. Would the renv lockfile help? Here is what I get when I load with the options you suggested above:
|
Hi, I also ran into warnings using 'renv::upgrade()' to migrate from 0.17.3 to 1.0.0 as an initial installation of the new version. I can't clarify the issue, but got a quick and dirty workaround:
Anyway, thank you for the renv update! |
It seems the error is occurring during dependency-finding:
|
I have now worked around this by specifying my dependencies explicitly in a DESCRIPTION file. I guess the error comes from parsing our code when finding dependencies. |
Here is my output: - Project '/xxxxx/xxxxx' loaded. [renv 1.0.0]
Error in is.na(value) :
(converted from warning) (converted from warning) is.na() applied to non-(list or vector) of type 'language'
Traceback (most recent calls last):
46: local({
try_source <- function(file) {
if (file.exists(file)) {
source(file)
TRUE
}
else {
FALSE
}
}
r_profile <- Sys.getenv("R_PROFILE_USER_OLD")
Sys.setenv(R_PROFILE_USER_OLD = "", R_PROFILE_USER = r_profile)
if (nzchar(r_profile)) {
try_source(r_profile)
}
else {
try_source(".Rprofile") || try_source(file.path("~",
".Rprofile"))
}
invisible()
})
45: eval.parent(substitute(eval(quote(expr), envir)))
44: eval(expr, p)
43: eval(expr, p)
42: eval(quote({
try_source <- function(file) {
if (file.exists(file)) {
source(file)
TRUE
} else {
FALSE
}
}
r_profile <- Sys.getenv("R_PROFILE_USER_OLD")
Sys.setenv(R_PROFILE_USER_OLD = "", R_PROFILE_USER = r_profile)
if (nzchar(r_profile)) {
try_source(r_profile)
} else {
try_source(".Rprofile") || try_source(file.path("~",
".Rprofile"))
}
invisible()
}), new.env())
41: eval(quote({
try_source <- function(file) {
if (file.exists(file)) {
source(file)
TRUE
} else {
FALSE
}
}
r_profile <- Sys.getenv("R_PROFILE_USER_OLD")
Sys.setenv(R_PROFILE_USER_OLD = "", R_PROFILE_USER = r_profile)
if (nzchar(r_profile)) {
try_source(r_profile)
} else {
try_source(".Rprofile") || try_source(file.path("~",
".Rprofile"))
}
invisible()
}), new.env())
40: try_source(".Rprofile")
39: source(file)
38: withVisible(eval(ei, envir))
37: eval(ei, envir)
36: eval(ei, envir)
35: source("renv/activate.R") at .Rprofile#11
34: withVisible(eval(ei, envir))
33: eval(ei, envir)
32: eval(ei, envir)
31: local(...) at activate.R#2
30: eval.parent(substitute(eval(quote(expr), envir)))
29: eval(expr, p)
28: eval(expr, p)
27: eval(quote(...), new.env())
26: eval(quote(...), new.env())
25: if (renv_bootstrap_load(project, libpath, version))
return(TRUE) at activate.R#1159
24: renv::load(project) at activate.R#847
23: renv_load_finish(project, lockfile)
22: renv_load_report_synchronized(project, lockfile)
21: (function() {
renv_scope_options(renv.verbose = FALSE)
status(project = project, sources = FALSE)
})()
20: status(project = project, sources = FALSE)
19: renv_status_impl(project, libpaths, lockpath, sources, cache)
18: renv_snapshot_dependencies(project, dev = FALSE)
17: dynamic(list(project = project, type = type, dev = dev), renv_snapshot_dependencies_impl(project,
type, dev))
16: the$dynamic_objects[[id]] %||% {
dlog("dynamic", "memoizing dynamic value for '%s'", id)
value
}
15: renv_snapshot_dependencies_impl(project, type, dev)
14: withCallingHandlers(renv_dependencies_impl(path = path, root = project,
field = "Package", errors = config$dependency.errors(), dev = dev),
renv.dependencies.problems = function(cnd) {
if (identical(config$dependency.errors(), "ignored"))
return()
if (interactive() && !proceed())
cancel()
}, renv.dependencies.elapsed_time = function(cnd) {
if (!type %in% c("packrat", "implicit"))
return()
elapsed <- cnd$data
limit <- getOption("renv.dependencies.elapsed_time_threshold",
default = 10L)
if (elapsed < limit)
return()
lines <- c("", "NOTE: Dependency discovery took %s during snapshot.",
"Consider using .renvignore to ignore files, or switching to explicit snapshots.",
"See `?renv::dependencies` for more information.",
"")
writef(lines, renv_difftime_format(elapsed))
})
13: renv_dependencies_impl(path = path, root = project, field = "Package",
errors = config$dependency.errors(), dev = dev)
12: renv_dependencies_discover(files, progress, errors)
11: bapply(paths, renv_dependencies_discover_impl)
10: lapply(x, f, ...)
9: FUN(X[[i]], ...)
8: tryCatch(filebacked("dependencies", path, callback), error = function(cnd) {
warning(cnd)
NULL
})
7: tryCatchList(expr, classes, parentenv, handlers)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
5: value[[3L]](cond)
4: warning(cnd)
3: withRestarts({
.Internal(.signalCondition(cond, message, call))
.Internal(.dfltWarn(message, call))
}, muffleWarning = function() NULL)
2: withOneRestart(expr, restarts[[1L]])
1: doWithOneRestart(return(expr), restart)
R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Platform: x86_64-pc-linux-gnu (64-bit) |
@kevinushey, I have a reproducible example. I am seeing a similar error when restarting R after upgrading to renv 1.0.0:
Interestingly, I performed the upgrade from 0.17.3 to 1.0.0 using the commands: renv::update("renv")
renv::snapshot() However, when I try the following I get an error:
I've upgraded several of my R packages to renv 1.0.0 with no issue; |
Hi, I had the same issue after upgrading to 1.0.0. The following warnings occured whenever I called
I tracked it down to an Rmd-file with the following chunk using a conditional evaluation:
(The variable I solved this by not using the negation:
The warnings disappeared afterwards. Hope this helps others as well. |
I think this is coming from Looks like the problem was caused in 314009b#diff-10360dfb4fa51b737341a4b5e8d5ea9758b1dcd3a9fb923349ee866120191a60 by removal of the It's probably worth breaking up |
I was using renv 0.17.3 with no problem, then upgraded to 1.0.0 using renv::upgrade()
Now whenever I open my project, or run renv::load() I get a list of warning messages:
It still seems to work fine, but it would be nice to get rid of the warnings.
The text was updated successfully, but these errors were encountered: