Skip to content

Add dartdoc support to DartCode #2807

Closed

Description

@timsneath

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 :)

Additional context

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Sep 19, 2020
  2. DanTup commented on Sep 20, 2020

    @DanTup
    Member

    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).

    @devoncarew is the dartdoc binary likely to be folded into dartdev?

  3. added this to the v3.15.0 milestone on Sep 20, 2020
  4. added
    in commandsRelates to commands (usually invoked from the command Palette)
    in tasksRelates to VS Code tasks, such as those provided by Task Providers
    on Sep 20, 2020
  5. DanTup commented on Sep 21, 2020

    @DanTup
    Member

    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.

  6. devoncarew commented on Sep 21, 2020

    @devoncarew
    Contributor

    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.

  7. DanTup commented on Sep 21, 2020

    @DanTup
    Member

    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).

  8. timsneath commented on Sep 21, 2020

    @timsneath
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in commandsRelates to commands (usually invoked from the command Palette)in tasksRelates to VS Code tasks, such as those provided by Task Providersis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions