[M] Change in dart/sdk[main]: api_summary: add basic CLI and validation test

0 views
Skip to first unread message

Kevin Moore (Gerrit)

unread,
May 12, 2026, 1:11:49 AM (yesterday) May 12
to Paul Berry, rev...@dartlang.org
Attention needed from Paul Berry

Kevin Moore voted

Auto-Submit+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Paul Berry
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Gerrit-Change-Number: 502840
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Paul Berry <paul...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 05:11:46 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Paul Berry (Gerrit)

unread,
May 12, 2026, 11:07:48 AM (23 hours ago) May 12
to Kevin Moore, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Kevin Moore

Paul Berry voted and added 6 comments

Votes added by Paul Berry

Code-Review+1

6 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Paul Berry . resolved

lgtm assuming comments are addressed.

File pkg/api_summary/bin/api_summary.dart
Line 35, Patchset 2 (Latest): print(summary);
Paul Berry . unresolved

This will cause an extra newline to be output at the end. Change to:
```
stdout.write(summary);
```

Line 42, Patchset 2 (Latest): } catch (e, stack) {
Paul Berry . unresolved

Drop this catch clause. It doesn't add any value; the default "unhandled exception" behavior does basically the same thing.

Line 54, Patchset 2 (Latest): help: 'The path to the package to summarize.',
Paul Berry . unresolved

Add text explaining that the default is to summarize the current directory.

Line 69, Patchset 2 (Latest): 'Could not find "name" in pubspec.yaml at ${pubspecFile.path}',
Paul Berry . unresolved

Misleading error message; this could also fire if the pubspec.yaml file _does_ contain a `name` field, but it has the wrong type.

I would change this to a traditional series of if-tests rather than a switch, so that the error message can explain what went wrong.

File pkg/api_summary/test/app_test.dart
Line 1, Patchset 2 (Latest):// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
Paul Berry . unresolved

To address the bot failure, you'll need to give this file a larger timeout. You should be able to do so by editing `pkg/pkg.status` and adding this line to the top section:

```
api_summary/test/app_test: Slow, Pass
```

Open in Gerrit

Related details

Attention is currently required from:
  • Kevin Moore
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Gerrit-Change-Number: 502840
Gerrit-PatchSet: 2
Gerrit-Owner: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Kevin Moore <kev...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 15:07:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Kevin Moore (Gerrit)

unread,
May 12, 2026, 12:07:38 PM (22 hours ago) May 12
to Paul Berry, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Paul Berry

Kevin Moore voted and added 6 comments

Votes added by Kevin Moore

Auto-Submit+1
Commit-Queue+2

6 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Kevin Moore . resolved

Thanks!!

File pkg/api_summary/bin/api_summary.dart
Line 35, Patchset 2: print(summary);
Paul Berry . resolved

This will cause an extra newline to be output at the end. Change to:
```
stdout.write(summary);
```

Kevin Moore

Done

Line 42, Patchset 2: } catch (e, stack) {
Paul Berry . resolved

Drop this catch clause. It doesn't add any value; the default "unhandled exception" behavior does basically the same thing.

Kevin Moore

Done

Line 54, Patchset 2: help: 'The path to the package to summarize.',
Paul Berry . resolved

Add text explaining that the default is to summarize the current directory.

Kevin Moore

Done

Line 69, Patchset 2: 'Could not find "name" in pubspec.yaml at ${pubspecFile.path}',
Paul Berry . resolved

Misleading error message; this could also fire if the pubspec.yaml file _does_ contain a `name` field, but it has the wrong type.

I would change this to a traditional series of if-tests rather than a switch, so that the error message can explain what went wrong.

Kevin Moore

Done

File pkg/api_summary/test/app_test.dart
Line 1, Patchset 2:// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
Paul Berry . resolved

To address the bot failure, you'll need to give this file a larger timeout. You should be able to do so by editing `pkg/pkg.status` and adding this line to the top section:

```
api_summary/test/app_test: Slow, Pass
```

Kevin Moore

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Paul Berry
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Gerrit-Change-Number: 502840
Gerrit-PatchSet: 3
Gerrit-Owner: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Paul Berry <paul...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 16:07:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Paul Berry <paul...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kevin Moore (Gerrit)

unread,
May 12, 2026, 1:03:04 PM (21 hours ago) May 12
to Paul Berry, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Paul Berry

Kevin Moore voted

Auto-Submit+1
Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Paul Berry
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Gerrit-Change-Number: 502840
Gerrit-PatchSet: 4
Gerrit-Owner: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Paul Berry <paul...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 17:03:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Paul Berry (Gerrit)

unread,
May 12, 2026, 1:29:39 PM (21 hours ago) May 12
to Kevin Moore, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Kevin Moore

Paul Berry voted and added 1 comment

Votes added by Paul Berry

Code-Review+1
Commit-Queue+2

1 comment

Patchset-level comments
Paul Berry . resolved

lgtm

Open in Gerrit

Related details

Attention is currently required from:
  • Kevin Moore
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Gerrit-Change-Number: 502840
Gerrit-PatchSet: 4
Gerrit-Owner: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Kevin Moore <kev...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 17:29:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

unread,
May 12, 2026, 1:44:51 PM (20 hours ago) May 12
to Kevin Moore, Paul Berry, rev...@dartlang.org

dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change

Change information

Commit message:
api_summary: add basic CLI and validation test
Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Auto-Submit: Kevin Moore <kev...@google.com>
Commit-Queue: Kevin Moore <kev...@google.com>
Commit-Queue: Paul Berry <paul...@google.com>
Reviewed-by: Paul Berry <paul...@google.com>
Files:
  • A pkg/api_summary/api_summary.txt
  • A pkg/api_summary/bin/api_summary.dart
  • M pkg/api_summary/pubspec.yaml
  • A pkg/api_summary/test/app_test.dart
  • M pkg/pkg.status
Change size: M
Delta: 5 files changed, 168 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Paul Berry
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Gerrit-Change-Number: 502840
Gerrit-PatchSet: 5
Gerrit-Owner: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
open
diffy
satisfied_requirement

Mark Zhou (Gerrit)

unread,
May 12, 2026, 5:34:51 PM (17 hours ago) May 12
to Kevin Moore, dart-...@luci-project-accounts.iam.gserviceaccount.com, Paul Berry, rev...@dartlang.org

Mark Zhou added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Mark Zhou . unresolved

These tests are timing out some of our bots - can y'all check? https://dart-current-results.web.app/?filter=pkg/api_summary/test/app_test&showAll

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Gerrit-Change-Number: 502840
Gerrit-PatchSet: 5
Gerrit-Owner: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-CC: Mark Zhou <mark...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 21:34:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

Kevin Moore (Gerrit)

unread,
May 12, 2026, 5:42:05 PM (16 hours ago) May 12
to dart-...@luci-project-accounts.iam.gserviceaccount.com, Mark Zhou, Paul Berry, rev...@dartlang.org

Kevin Moore added 2 comments

Patchset-level comments
Mark Zhou . resolved

These tests are timing out some of our bots - can y'all check? https://dart-current-results.web.app/?filter=pkg/api_summary/test/app_test&showAll

Kevin Moore . resolved

Sorry!

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Gerrit-Change-Number: 502840
Gerrit-PatchSet: 5
Gerrit-Owner: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-CC: Mark Zhou <mark...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 21:42:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mark Zhou <mark...@google.com>
satisfied_requirement
open
diffy

Paul Berry (Gerrit)

unread,
May 12, 2026, 5:42:12 PM (16 hours ago) May 12
to Kevin Moore, dart-...@luci-project-accounts.iam.gserviceaccount.com, Mark Zhou, rev...@dartlang.org
Attention needed from Kevin Moore

Paul Berry added 1 comment

Patchset-level comments
Mark Zhou . unresolved

These tests are timing out some of our bots - can y'all check? https://dart-current-results.web.app/?filter=pkg/api_summary/test/app_test&showAll

Paul Berry

Oops, it looks like I was wrong about needing to add that line to `pkg/pkg.status`. What we're supposed to do instead to increase the timeout is documented here: https://pub.dev/packages/test#timeouts

@kev...@google.com, would you mind making a CL to fix this?

Open in Gerrit

Related details

Attention is currently required from:
  • Kevin Moore
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I3e9b5a4c3f1d31967a503c4caf273b9d8f239095
Gerrit-Change-Number: 502840
Gerrit-PatchSet: 5
Gerrit-Owner: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Kevin Moore <kev...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-CC: Mark Zhou <mark...@google.com>
Gerrit-Attention: Kevin Moore <kev...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 21:42:09 +0000
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages