Products | Versions |
---|---|
Spotfire Enterprise Runtime for R | 4.5.0, 5.0.0 |
In TERR 4.5.0 or TERR 5.0.0, a call to library(rlang), for example, may fail with an error like the following:
Error loading CRAN "rlang" package: "package 'rlang' was built by an R engine with different internals"
This is the expected behavior in TERR 4.5.0, if the installed version of that user-contributed CRAN package was built using open-source R 3.5.0 or later.
It is also the expected behavior in TERR 5.0.0, if the installed version of that user-contributed CRAN package was built using an open-source R version earlier than R 3.5.0 (such as R 3.4.4, for example).
The following is the logic that triggers the reported error message in TERR 4.5.0 (see the function definition for the TERR function base:::.checkPackageBuildVersion() ):
#-----
if(pkgEngine == "R") {
if(pkgVersion >= numeric_version("3.5.0")) {
warning(sprintf("package '%s' was built under R version %s", package, pkgVersion))
if(dir.exists(file.path(path, "libs"))) {
stop(sprintf("package '%s' was built by an R engine with different internals", package))
}
#-----
That logic is part of the package checks performed in TERR 4.5.0 or TERR 5.0.0 whenever a script calls for loading an R package or its namespace.
It is there because open-source R 3.5.0 introduced significant changes that affect binary compatibility between packages built using R 3.4.x and packages built using R 3.5.x.
As the following command shows, open-source R 3.4.4 was used as the reference version in the compatibility testing for TERR 4.5.0:
>
>
> getRversion()
[1] '3.4.4'
>
>
As the following command shows, open-source R 3.5.2 was used as the reference version in the compatibility testing for TERR 5.0.0:
>
>
> getRversion()
[1] '3.5.2'
>
>