You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Running dartdoc from the command line is fine, but if you don't know that it exists, you're probably not going to organically discover it.
Describe the solution you'd like
A new command "Dart: Generate documentation" which finds dartdoc in the binary cache and executes it. Optionally, check for the existence of dartdoc_options.yaml and provide a sensible default if it's missing.
Describe alternatives you've considered
Continuing to use the command line and grumbling under my breath :)
It may make sense to contribute this with a task provider (similar to #2718). That way it's easy to lift into your own tasks.json if you want to customise it (eg. pass other args) and/or set it as a preLaunchTask or similar. We could probably still optionally wrap it as a command (hopefully in a way that if a user had overridden it in tasks.json, it'd run that version).
I've implemented in a task provider (because of the advantages mentioned above), but also added a command that wraps it (to make it easier to find). It'll show up in a few places:
Command palette
Toolbar icon when you have a dartdoc_options.yaml file open
Context menu of dartdoc_options.yaml in the explorer tree
In the Run Task section
Unfortunately the args can't be customised in task.json as I expected yet (there's an open issue about this at microsoft/vscode#58836), though for this particular command I think using the yaml file is probably more common.
Yes, dartdoc will almost certainty be rolled into dartdev (exact timing TBD).
I don't think this command is typically run by users. It's much more likely to be a CI type thing - run by dart.dev, flutter.dev, and pub.dev/documentation. Myself, I wouldn't worry about having an easy IDE entrypoint.
Even if it's not used much, it was a good way to try out a task provider without disrupting the existing commands. We have a bunch things with a lot of custom code (things like pub get, pub upgrade, flutter doctor, flutter upgrade, etc.) that would be simpler as tasks (and get some benefit from running in the terminal, like clickable links for filenames and being able to press Ctrl+C for users to terminate - which might help sidestep things like flutter/flutter#61357).
Thanks Danny!
Devon, I agree that might be the steady-state, particularly for larger
projects.
But as with other CI journeys (build, test) that are accessible through
DartCode, I suspect the typical pattern is:
- Customer discovers that the feature exists (DartCode can help here)
- Customer tries out the feature and gets it configured (DartCode can
help here)
- Some customers integrate it into CI
Added to that, this feature can be confusing from the CLI -- the docs are
conflicted about whether a user should pub global activate
<https://pub.dev/packages/dartdoc/install> it or add the Dart SDK
<https://pub.dev/packages/dartdoc> to their path. If we can make this
easier, I'm delighted!
Look forward to trying this out.
On Mon, Sep 21, 2020 at 8:33 AM Danny Tuppeny ***@***.***> wrote:
Even if it's not used much, it was a good way to try out a task provider
without disrupting the existing commands. We have a bunch things with a lot
of custom code (things like pub get, pub upgrade, flutter doctor, flutter
upgrade, etc.) that would be simpler as tasks (and get some benefit from
running in the terminal, like clickable links for filenames and being able
to press Ctrl+C for users to terminate - which might help sidestep things
like flutter/flutter#61357
<flutter/flutter#61357>).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2807 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARWL64UHOZ3GCYC26GHUOTSG5W25ANCNFSM4RTE6QWQ>
.
Activity
DanTup commentedon Sep 20, 2020
It may make sense to contribute this with a task provider (similar to #2718). That way it's easy to lift into your own tasks.json if you want to customise it (eg. pass other args) and/or set it as a
preLaunchTaskor similar. We could probably still optionally wrap it as a command (hopefully in a way that if a user had overridden it in tasks.json, it'd run that version).@devoncarew is the dartdoc binary likely to be folded into dartdev?
DanTup commentedon Sep 21, 2020
I've implemented in a task provider (because of the advantages mentioned above), but also added a command that wraps it (to make it easier to find). It'll show up in a few places:
dartdoc_options.yamlfile opendartdoc_options.yamlin the explorer treeRun TasksectionUnfortunately the args can't be customised in task.json as I expected yet (there's an open issue about this at microsoft/vscode#58836), though for this particular command I think using the yaml file is probably more common.
devoncarew commentedon Sep 21, 2020
Yes, dartdoc will almost certainty be rolled into dartdev (exact timing TBD).
I don't think this command is typically run by users. It's much more likely to be a CI type thing - run by dart.dev, flutter.dev, and pub.dev/documentation. Myself, I wouldn't worry about having an easy IDE entrypoint.
DanTup commentedon Sep 21, 2020
Even if it's not used much, it was a good way to try out a task provider without disrupting the existing commands. We have a bunch things with a lot of custom code (things like
pub get,pub upgrade,flutter doctor,flutter upgrade, etc.) that would be simpler as tasks (and get some benefit from running in the terminal, like clickable links for filenames and being able to press Ctrl+C for users to terminate - which might help sidestep things like flutter/flutter#61357).timsneath commentedon Sep 21, 2020