Weird stuff happening on second evaluation in a fresh session while testing alike:
> unitize_dir()
Error in (function (cl, name, valueClass) :
c("assignment of an object of class “FacetNull” is not valid for @‘source’ in an object of class “functionWithTrace”; is(value, \"environment\") is not TRUE", "assignment of an object of class “Facet” is not valid for @‘source’ in an object of class “functionWithTrace”; is(value, \"environment\") is not TRUE", "assignment of an object of class “ggproto” is not valid for @‘source’ in an object of class “functionWithTrace”; is(value, \"environment\") is not TRUE"
)
Error in (function (cl, name, valueClass) :
c("assignment of an object of class “FacetNull” is not valid for @‘source’ in an object of class “functionWithTrace”; is(value, \"environment\") is not TRUE", "assignment of an object of class “Facet” is not valid for @‘source’ in an object of class “functionWithTrace”; is(value, \"environment\") is not TRUE", "assignment of an object of class “ggproto” is not valid for @‘source’ in an object of class “functionWithTrace”; is(value, \"environment\") is not TRUE"
)
In addition: Warning message:
In FUN(X[[i]], ...) :
Failed attempting to trace `library`; see prior errors
Error in (function (cl, name, valueClass) :
c("assignment of an object of class “FacetNull” is not valid for @‘source’ in an object of class “functionWithTrace”; is(value, \"environment\") is not TRUE", "assignment of an object of class “Facet” is not valid for @‘source’ in an object of class “functionWithTrace”; is(value, \"environment\") is not TRUE", "assignment of an object of class “ggproto” is not valid for @‘source’ in an object of class “functionWithTrace”; is(value, \"environment\") is not TRUE"
)
In addition: Warning message:
In FUN(X[[i]], ...) : Failed attempting to trace `attach`; see prior errors
For reference, this seems to be related to:
> library(ggplot2)
> df1 <- data.frame(x = runif(20), y = runif(20))
> df2 <- data.frame(x = runif(20), y = runif(20), z = rep(c("a",
+ "b"), 10))
> df3 <- data.frame(a = runif(30), b = runif(30))
> g1 <- ggplot(df1) + geom_point(aes(x = x, y = y))
> g2 <- ggplot(df1) + geom_line(aes(x = x, y = y))
> g3 <- ggplot(df3) + geom_point(aes(x = a, y = b))
> g4 <- ggplot(df1, aes(x = x, y = y)) + geom_point() + geom_line()
> g.abs <- abstract(g1)
> alike(g.abs, g1)
[1] "`g1$layers[[1]]` should be class \"FacetNull\" (is \"environment\")"
| Value mismatch:
< .ref > .new
@@ 1 @@ @@ 1 @@
< [1] TRUE > [1] "`g1$layers[[1]]` should be class
~ : \"FacetNull\" (is \"environment\")"
Notice the FacetNull.
This seems to happen before test evaluation. To reproduce:
unitize() # select alike
# quit immediately
unitize() # then get the warnings
So it seems that after loading ggplot we can no longer trace stuff.
This was actually a problem with abstract replacing environments with the empty env as a default action, but then re-attaching classes to that environment.
Weird stuff happening on second evaluation in a fresh session while testing
alike
:For reference, this seems to be related to:
Notice the
FacetNull
.This seems to happen before test evaluation. To reproduce:
So it seems that after loading ggplot we can no longer trace stuff.