-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
deprecate and remove standalone dartdoc tool #44610
Comments
Adding area-build as well since dartdoc-in-the-SDK's most important user is the SDK build system itself. |
My preference is option 3, which is what we're doing for other tools (dartfmt, analyzer, pub). I really like the consistency of that. Yes, that has the disadvantage that it becomes a bit harder to use bleeding edge versions of |
+1 to option 3. We're trying our best to stay consistent and embed tooling into dartdev when it makes sense to. However, option 2 would allow for us to dynamically install dartdoc which has the nice property of not using extra disk space for users that never run the tool, which I think was an original goal for the CLI unification effort. Is that something we'd still be interesting in doing @mit-mit or did we shelve the idea for some particular reason? |
+1 for consistency -- will go for option 3 then unless there's a strong reason to do otherwise. |
Yes, that is correct, but that was more in the context of very large and rarely used features; say downloading an 100MB linker for building a custom embedder, og something like that. |
@jcollins-g is there a known timeline for this deprecation? |
@mit-mit It is on the Q3 OKRs but not at a high priority (P2) |
Based on offline discussion, a proposed minimum list of command line parameters:
You could use fork and exec, but I would suggest creating your own entry point modeled after https://github.com/dart-lang/dartdoc/blob/master/bin/dartdoc.dart. You might even be able to get dartdoc to handle help and all command line bits for you, at the expense of having a large surface area. Let me know if you have any questions. |
Thanks! What's the typical use for the |
The typical use for the sdk docs option is to generate documentation for the SDK. A developer will use that if they want to check or modify docs for the SDK itself. It could be omitted if you want, especially since the pub package still exists. |
I've started working on this in this CL: I have a test issue I'm hunting down with @bkonyi, but other than that it's pretty much done. I've done just the basic arg parsing:
|
The new changes LGTM. I'm assuming there's corresponding changes in dart-lang/dartdoc (maybe dart-lang/dartdoc#2857?) |
You, that issue you're linking needs to land first, then we'll roll dartdoc, and then my CL should work. |
Bug: #44610 Change-Id: Ieb17c588f66354c0af31cb510bc9cd8c9a4e3f61 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221762 Reviewed-by: Michael Thomsen <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
The new |
Mark the `dartdoc` command as deprecated. It's being replaced by the `dart doc` command. Part of #44610 Change-Id: Ia0607cb53ef526388a749acb735fd6145149334e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221948 Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Michael Thomsen <[email protected]>
Deprecation message was added in https://dart-review.googlesource.com/c/sdk/+/221948 |
Discontinuation in https://dart-review.googlesource.com/c/sdk/+/228647 |
@mit-mit is it intended/expected that the input directory is mandatory using the new command (but wasn't before)?
I noticed this while moving VS Code over. It's no bother for me to pass |
Yes, that is intentional. It was something we discussed a bit back and forth, and agreed to require given the command has a side effect that it changes the input directory (by writing a lot if files to it). This is consistent with the |
Cool, just wanted to check it wasn't accidental. Thanks! |
The dartdoc tool needs to be removed as a standalone tool in the SDK.
Checklist:
dart doc
command: https://dart-review.googlesource.com/c/sdk/+/220744bin/dartdoc
: https://dart-review.googlesource.com/c/sdk/+/221948bin/dartdoc
Possible alternatives include:
1) Simply deprecating/deleting it and taking no further action, requiring users to use pub global activate dartdoc to install a package to document code. This is a straightforward approach that matches with recommended best practice for using dartdoc.2) Deprecating the standalone tool, and replacing it with a wrapper inside dartdev that uses pub global activate internally to install dartdoc, then pass dartdoc the command line parameters.
3) Deprecating the standalone tool, and replacing it with a full version of dartdoc linked into dartdev as a library.
2 and 3 look largely the same to the user, 2 being more fragile and requiring network access but also more compact for SDK size.
My inclination is to go with option 1, funneling all users to the pub package.
edit: option 3 was chosen.
cc @mit-mit, @devoncarew, @bkonyi for input
The text was updated successfully, but these errors were encountered: