Commit 41709a9
[analyzer_utilities] Ensure just one context when generating api.txt.
When generating `api.txt` files, it's important to verify that the
`AnalysisContextCollection` contains just a single analysis context,
otherwise `publicApi.build` won't see all the files in the package,
and some parts of the API will be left out.
This change switches to `collection.contexts.single` instead of
`collection.contexts.first`, so that if something goes wrong and the
collection contains more than one analysis context, an error will
occur rather than silent misbehavior.
Change-Id: I6a6a69647f5cd957a1a04bbb54940f48eefce3f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444860
Auto-Submit: Paul Berry <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>1 parent 966500e commit 41709a9
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
0 commit comments