Skip to content

"flutter create daemon" has no output #75876

Closed

Description

@Hixie

Running "flutter create daemon" (creating an app in a directory "daemon") shows no output.

This is because we blindly look for any argument "daemon" to decide how to set up the logger in executable.dart, not just the one that "args" will treat as the "daemon" command.

A similar problem occurs with several of the other flags we try to set in main(), like runMachine, prefixedErrors, and powershellHelpIndex. I think doctor, help, and muteCommandLogging as written are actually safe, though the comments could definitely better highlight the risk of relying on these in future code.

cc @jonahwilliams

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    a: qualityA truly polished experience
    P2Important issues not at the top of the work list
    on Feb 11, 2021
  2. jonahwilliams commented on Feb 11, 2021

    @jonahwilliams
    Contributor

    I think I could make the daemon case more specific.

    In general though, this part of the code is definitely fragile. There is a sort of interconnectedness between all of the Command classes, their injected dependencies, and their supported arguments themselves. I've been trying to untangle them gradually, but I clearly missed some cases here.

    It would be nice if I could supply a limited arg parser for just pulling off the high level options (daemon, machine, help) that could ignore the rest.

  3. Hixie commented on Feb 11, 2021

    @Hixie
    ContributorAuthor

    Oh, good idea. We should be able to do that pretty easily. The ArgParser could be just given "daemon", "run", and "attach" as basic commands, and "--help", "--verbose", "--machine", etc, as arguments, and we could use that to determine the basic settings, and then we would just parse everything again once we'd built the actual commands.

  4. jonahwilliams commented on Feb 11, 2021

    @jonahwilliams
    Contributor

    I think I looked into this last year, but I found that you can either make an arg parser that is strict or one that is lenient but doesn't give you structured results.

  5. Hixie commented on Feb 12, 2021

    @Hixie
    ContributorAuthor

    The other option might be to have a trivial parser of our own. That should be relatively easy too. We just need to collect arguments that have "--"/"-" at the start until the first one that doesn't, if I'm understanding what we're looking at here. Maybe those with "--"/"-", then one that's just text, then those with "--"/"-", then ignore everything after the second one that doesn't start with those. That kind of thing. That would avoid the current bugs without much additional complexity.

  6. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    on Jul 10, 2025
  7. github-actions commented on Sep 7, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Sep 7, 2026
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

    P2Important issues not at the top of the work lista: qualityA truly polished experienceteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions