Skip to content
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

Documentation error in open for opening a command #30541

Closed
affans opened this issue Dec 31, 2018 · 3 comments
Closed

Documentation error in open for opening a command #30541

affans opened this issue Dec 31, 2018 · 3 comments
Labels
docs This change adds or pertains to documentation good first issue Indicates a good issue for first-time contributors to Julia help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@affans
Copy link
Contributor

affans commented Dec 31, 2018

In v0.6, it used to be that o, p = open(``ls``) would work and return a Tuple. The documentation says so as well.

However, the source code suggests that only a Process is returned. I don't know if this is a 1.0 change and if it is, the documentation needs to be updated on the above linked page.

Bug reproducibility:


julia> o, a = open(`ls`)
ERROR: MethodError: no method matching iterate(::Base.Process)
Closest candidates are:
  iterate(::Core.SimpleVector) at essentials.jl:589
  iterate(::Core.SimpleVector, ::Any) at essentials.jl:589
  iterate(::ExponentialBackOff) at error.jl:171
@inkydragon
Copy link
Member

Change happens in 94acb6f#diff-ab46297895850308343e9cbd5ebeb6cdR600
and this pr didn't update docs

@fredrikekre fredrikekre added docs This change adds or pertains to documentation help wanted Indicates that a maintainer wants help on an issue or pull request good first issue Indicates a good issue for first-time contributors to Julia labels Dec 31, 2018
@affans
Copy link
Contributor Author

affans commented Jan 2, 2019

Has this been fixed in latest master? Looks like the docs for open in process.jl has the correct docstring...

git blame -L 635,650 base/process.jl shows that @vtjnash correctly wrote the docstring. Any ideas why it's not updated on the website?

@inkydragon that commit is from August 2015... I don't really know how git works so I am not sure what I am talking about here 👎

@inkydragon
Copy link
Member

@affans Just be atient. this will be fixed automatically until next release comes out.

The v1.0.3 online doc point to (#28748)

julia/base/process.jl

Lines 574 to 582 in 099e826

"""
open(command, stdio=devnull; write::Bool = false, read::Bool = !write)
Start running `command` asynchronously, and return a tuple `(stream,process)`. If `read` is
true, then `stream` reads from the process's standard output and `stdio` optionally
specifies the process's standard input stream. If `write` is true, then `stream` writes to
the process's standard input and `stdio` optionally specifies the process's standard output
stream.
"""

That is an old version, and the next pr #25563 fix the doc string.
but the online doc didn't update, because online doc Update when a new release comes out.
image
—— history of process.jl

So, You need to wait until next release comes out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation good first issue Indicates a good issue for first-time contributors to Julia help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

4 participants