Closed DrChainsaw closed 1 year ago
Is it intentional that exec does nothing on Files?
exec
File
julia> ff = File(nothing, "test", FileTrees.lazy(identity)(12)) File(test) julia> exec(ff)[] Thunk[91475](identity, Any[12])
It seems like it would be quite useful with mapsubtrees to get a partially loaded tree:
mapsubtrees
julia> t = maketree("root" => [(name="a", value=FileTrees.lazy(identity)(2)), (name="b", value=FileTrees.lazy(identity)(3))]) root/ ├─ a (Thunk[91476](identity, Any[2])) └─ b (Thunk[91477](identity, Any[3])) julia> mapsubtrees(exec, t, r"b") # Does nothing :( root/ ├─ a (Thunk[91476](identity, Any[2])) └─ b (Thunk[91477](identity, Any[3])) julia> FileTrees.exec(f::File) = setvalue(f, exec(f[])) julia> mapsubtrees(exec, t, r"b") root/ ├─ a (Thunk[91476](identity, Any[2])) └─ b (Int64)
I don't think that's intentional..
Is it intentional that
exec
does nothing onFile
s?It seems like it would be quite useful with
mapsubtrees
to get a partially loaded tree: