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

If first invocation of a Dart script, as a @tool, crashes, the snapshot is not made, but dartdoc does not stop. #2344

Open
srawlins opened this issue Sep 11, 2020 · 3 comments · Fixed by #2686
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@srawlins
Copy link
Member

This was discovered testing 0.33.0 on flutter.

@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P2 A bug or feature request we're likely to work on labels Sep 11, 2020
@srawlins
Copy link
Member Author

I am hitting this today again. Snapshotting is failing because of some issue with null-safety. When I run it manually:

$ /Users/srawlins/code/flutter/bin/cache/dart-sdk/bin/dart --ignore-unrecognized-flags --verbosity=error --snapshot=/var/folders/84/mf667nnx3k72cb2h2b2btt6r005w15
/T/dartdoc_snapshot_cache_yEVyeM/snapshot_0 --snapshot_kind=app-jit /Users/srawlins/code/flutter/dev/snippets/lib/main.dart --type=sample --template=stateless_widget                              
../snippets/lib/configuration.dart:44:12: Error: Null safety features are disabled for this library.                                                                                               
Try removing the package language version or setting the language version to 2.12 or higher.                                                                                                       
  Directory? _configPath;                                                                                                                                                                          
           ^

@srawlins
Copy link
Member Author

srawlins commented Jun 17, 2021

The two issues I see here are:

  • the toolErrorCallback does not actually print any warning to the terminal, so all following errors are a mystery.
  • the tool will continue to be run; if the snapshot failed, the tool should not be run any more.

@srawlins
Copy link
Member Author

Small note: the debugging print I put here: #2690 does print, but the warning won't show, on a dart invocation which fails to produce a snapshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on 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.

1 participant