-
Notifications
You must be signed in to change notification settings - Fork 5.7k
feat(cli/doc): Support doc for runtime built-ins #4635
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, sans $
- I leave it to @ry to decide what symbol should be used
The How about |
@ry Can we use an explicit empty value? It's reasonable next to the default case.
If not, I can't find a way of conditioning the first positional argument on |
No, that's also difficult to read. I think a flag like |
|
I think |
Using a
The second
But it still doesn't parse right. |
418d7f6
to
f04a02b
Compare
f04a02b
to
20f6845
Compare
Opened clap-rs/clap#1794, but we have to land this workaround for now (see todo). @bartlomieju Please review. |
// TODO(nayeemrmn): Make `--builtin` a proper option. Blocked by | ||
// https://github.com/clap-rs/clap/issues/1794. Currently `--builtin` is | ||
// just a possible value of `source_file` so leading hyphens must be | ||
// enabled. | ||
.setting(clap::AppSettings::AllowLeadingHyphen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
pub fn parse_source( | ||
&self, | ||
file_name: &str, | ||
source_code: &str, | ||
) -> Result<Vec<DocNode>, ErrBox> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly this method is needed only to parse given source code without using loader, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this was satisfied previously by the old parse()
signature before reexport support.
cc @lucacasonato @bartlomieju
Equivalent to
deno doc https://github.com/denoland/deno/releases/download/v0.39.0/lib.deno.d.ts
:Updated
Old