Skip to content
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

Usage error printing during script snapshot creation (first run only) #2525

Closed
jakemac53 opened this issue Jun 15, 2020 · 3 comments · Fixed by #2531
Closed

Usage error printing during script snapshot creation (first run only) #2525

jakemac53 opened this issue Jun 15, 2020 · 3 comments · Fixed by #2531
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@jakemac53
Copy link
Contributor

See this travis failure https://travis-ci.org/github/dart-lang/build/jobs/698366117#L289.

To reproduce you can check out the build repo, change to the build_modules directory, and run this command dart $(pub run build_runner generate-build-script) test, which prints:

Cannot specify arguments before a command.
Usage: dart [<vm-flags>] <command|dart-file> [<arguments>]
...

You can keep reproducing it by deleting the snapshot created for build_runner under .dart_tool/pub/.

If you separate the command into two separate lines it does work as expected:

pub run build_runner generate-build-script
dart .dart_tool/build/entrypoint/build.dart test
@jakemac53 jakemac53 added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) pub-run labels Jun 15, 2020
jakemac53 added a commit to dart-lang/build that referenced this issue Jun 15, 2020
@natebosch
Copy link
Member

This is because the command that dart sees is effectively dart Precompiling test or something along those lines.

@jakemac53
Copy link
Contributor Author

Oh right, that totally makes sense. Did this change from printing on stdout vs stderr or something possibly?

@sigurdm
Copy link
Contributor

sigurdm commented Jun 16, 2020

The precompilation message should only be printed if there is an attached terminal. Looks like I broke that with the latest refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants