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

evalfile is not sufficiently documented. #45559

Closed
Sean1708 opened this issue Jun 2, 2022 · 0 comments
Closed

evalfile is not sufficiently documented. #45559

Sean1708 opened this issue Jun 2, 2022 · 0 comments
Labels
docs This change adds or pertains to documentation good first issue Indicates a good issue for first-time contributors to Julia

Comments

@Sean1708
Copy link
Contributor

Sean1708 commented Jun 2, 2022

The current docstring for evalfile is

    evalfile(path::AbstractString, args::Vector{String}=String[])

Load the file using [`include`](@ref), evaluate all expressions,
and return the value of the last one.

but there are at least two things that are not well enough documented IMO:

  1. The phrase "Load the file using include" does not (IMO) make it clear enough that things defined in the file will not be defined in the calling module, unlike when using include. Of course this is part of the entire point of evalfile, but it requires experimentation and guesswork (or reading the source) to figure that out.
  2. It's not clear how to use args in the file. Again one could read the source or use guesswork and experimentation to figure out that it's set to ARGS, but that kind of defeats the point of having documentation.
@kshyatt kshyatt added docs This change adds or pertains to documentation good first issue Indicates a good issue for first-time contributors to Julia labels Oct 5, 2022
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
Projects
None yet
Development

No branches or pull requests

2 participants