New behavior of open(command)



Hi all, I’m upgrading ClusterManagers.jl to be 0.7-ready, and the last deprecation warning I’m finding is in the launch method for a LocalAffinityManager. Line 37 in affinity.jl has io, pobj = open(detach(...), "r"). This elicits a deprecation warning “open(cmd) now returns only a Process<:IO object”.

However, the documentation of this open method gives the signature open(command, stdio=devnull; write::Bool = false, read::Bool = !write) and still says that it returns a tuple (stream, process), contradicting the deprecation warning. Further confusing matters, in the source of the Distributed package in managers.jl we have open invoked as io = open(detach(setenv(cmd, dir=dir)), "r+"), which matches the return type in the docs but not the signature.

So, my question is, what is the new correct way to write this code? I assume that I should only take one return from open, but which is the correct signature to use?

Edit: Also, should the io field of a WorkerConfig in general be the out field of a Process? I’m not sure what exactly is expected behavior.