-
Notifications
You must be signed in to change notification settings - Fork 14
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
BUG: install.packages("lambda.r") fails in R-devel w/ _R_CHECK_LENGTH_1_LOGIC2_=true #37
Comments
…with _R_CHECK_LENGTH_1_LOGIC2_=true
Hi @muxspace, is this repos/package still maintained? I haven't seen any activity in a while and I wonder if there's any chance this issue to get resolved. It's kind of a blocker downstream, e.g. when you try to run strict |
@HenrikBengtsson I didn't see this issue until now. I'll take a look and see about resolving it. |
Awesome. Thxs. |
Here are some more troubleshooting details: $ _R_CHECK_LENGTH_1_LOGIC2_=verbose Rscript --vanilla -e 'install.packages("futile.logger", repos="https://cloud.r-project.org")'
Installing package into ‘/home/alice/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/futile.logger_1.4.3.tar.gz'
Content type 'application/x-gzip' length 17456 bytes (17 KB)
==================================================
downloaded 17 KB
* installing *source* package ‘futile.logger’ ...
** package ‘futile.logger’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
----------- FAILURE REPORT --------------
--- failure: length > 1 in coercion to logical ---
--- srcref ---
:
--- package (from environment) ---
lambda.r
--- call from context ---
NULL
--- call from argument ---
!is.na(line <- it()) && line$token != "SPECIAL"
--- R stacktrace ---
where 1: parse_fun(it)
where 2: describe(fn, idx, raw = FALSE) %when% {
raw
} %:=% {
class(fn) <- NULL
print(fn)
}
where 3: eval(exprs[i], envir)
where 4: eval(exprs[i], envir)
where 5: sys.source(codeFile, env, keep.source = keep.source, keep.parse.data = keep.parse.data)
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, classes, parentenv, handlers)
where 9: tryCatch(expr, error = function(e) {
call <- conditionCall(e)
if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)
dcall <- deparse(call)[1L]
prefix <- paste("Error in", dcall, ": ")
LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")
if (w > LONG)
prefix <- paste0(prefix, "\n ")
}
else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)
.Internal(printDeferredWarnings())
}
invisible(structure(msg, class = "try-error", condition = e))
})
where 10: try(sys.source(codeFile, env, keep.source = keep.source, keep.parse.data = keep.parse.data))
where 11: loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
where 12: namespaceImport(ns, loadNamespace(i, c(lib.loc, .libPaths()),
versionCheck = vI[[i]]), from = package)
where 13: loadNamespace(package = package, lib.loc = lib.loc, keep.source = keep.source,
keep.parse.data = keep.parse.data, partial = TRUE)
where 14: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
where 15: suppressPackageStartupMessages(loadNamespace(package = package,
lib.loc = lib.loc, keep.source = keep.source, keep.parse.data = keep.parse.data,
partial = TRUE))
where 16: code2LazyLoadDB(package, lib.loc = lib.loc, keep.source = keep.source,
keep.parse.data = keep.parse.data, compress = compress, set.install.dir = set.install.dir)
where 17: tools:::makeLazyLoading("futile.logger", "/home/alice/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-futile.logger/00new",
keep.source = FALSE, keep.parse.data = FALSE, set.install.dir = "/home/alice/R/x86_64-pc-linux-gnu-library/3.6/futile.logger")
--- value of length: 9 type: logical ---
line1 col1 line2 col2 id parent token terminal text
2 TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
--- function from context ---
--- function search by body ---
----------- END OF FAILURE REPORT --------------
Error in !is.na(line <- it()) && line$token != "SPECIAL" :
'length(x) = 9 > 1' in coercion to 'logical(1)'
Error: unable to load R code in package ‘lambda.r’
Execution halted
ERROR: lazy loading failed for package ‘futile.logger’
* removing ‘/home/alice/R/x86_64-pc-linux-gnu-library/3.6/futile.logger’
* restoring previous ‘/home/alice/R/x86_64-pc-linux-gnu-library/3.6/futile.logger’
The downloaded source packages are in
‘/tmp/alice/Rtmpr1kUbz/downloaded_packages’
Warning message:
In install.packages("futile.logger", repos = "https://cloud.r-project.org") :
installation of package ‘futile.logger’ had non-zero exit status |
Hi @HenrikBengtsson I pushed a fix to master. Can you check on your end that it works? If so, I'll submit it to CRAN. |
LGTM. Confirming. Thanks :) |
It's on CRAN now |
Great. Thanks
…On Fri, Sep 20, 2019, 07:28 Brian Lee Yung Rowe ***@***.***> wrote:
It's on CRAN now
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#37?email_source=notifications&email_token=AAMKXUSZMFGSSYJHNKJVV2TQKTMXLA5CNFSM4G45N2SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G3XPI#issuecomment-533576637>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMKXUSA6WR7HPJRIYCG2ELQKTMXLANCNFSM4G45N2SA>
.
|
No problem. Thanks for making enough noise so I could address it :) |
In R-devel, there are now optional checks asserting that
x && y
is not called withlength(x) > 1
orlength(y) > 1
. These checks can be enabled with_R_CHECK_LENGTH_1_LOGIC2_=true
- I'll assume they'll eventually will be on by default. I guess that CRAN will enable them before that. I know that the CRAN incomin checks already have it enabled.lambda.r produces:
already when installed.
Example
Session info
The text was updated successfully, but these errors were encountered: