Skip to content

Commit

Permalink
rev version; prep for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Jan 23, 2025
1 parent 682c8ef commit a6c37b5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
3 changes: 2 additions & 1 deletion pkgs/firehose/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## 0.10.2-wip
## 0.10.2

- Don't check licenses of generated files in PR health workflow.
- Add generalized ignore-per-checks to health workflow.
- Update dart_apitool version in health workflow.
- Print detailed info about the leaked APIs to stdout in the workflow.

## 0.10.1

Expand Down
2 changes: 0 additions & 2 deletions pkgs/firehose/lib/firehose.dart
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,6 @@ class VerificationResults {
bool get hasError => results.any((r) => r.severity == Severity.error);

String describeAsMarkdown({bool withTag = true}) {
results.sort((a, b) => Enum.compareByIndex(a.severity, b.severity));

return results.map((r) {
var sev = r.severity == Severity.error ? '(error) ' : '';
var tagColumn = '';
Expand Down
21 changes: 18 additions & 3 deletions pkgs/firehose/lib/src/health/health.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,14 @@ ${changeForPackage.entries.map((e) => '|${e.key.name}|${e.value.toMarkdownRow()}
arguments,
workingDirectory: directory.path,
);
log('StdOut:\n ${runApiTool.stdout as String}');
log('StdErr:\n ${runApiTool.stderr as String}');
final out = (runApiTool.stdout as String).trimRight();
if (out.isNotEmpty) {
print(out);
}
final err = (runApiTool.stderr as String).trimRight();
if (err.isNotEmpty) {
print(err);
}
return runApiTool;
}

Expand All @@ -257,7 +263,10 @@ ${changeForPackage.entries.map((e) => '|${e.key.name}|${e.value.toMarkdownRow()}
final flutterPackages =
packagesContaining(filesInPR, only: flutterPackageGlobs);
log('This list of Flutter packages is $flutterPackages');

for (var package in packagesContaining(filesInPR)) {
log('');
log('--- $package ---');
log('Look for leaks in $package');
var relativePath =
path.relative(package.directory.path, from: directory.path);
Expand Down Expand Up @@ -294,9 +303,15 @@ ${changeForPackage.entries.map((e) => '|${e.key.name}|${e.value.toMarkdownRow()}
var decoded = jsonDecode(fullReportString) as Map<String, dynamic>;
var leaks = decoded['missingEntryPoints'] as List<dynamic>;

log('Leaking symbols in API:\n$leaks');
if (leaks.isNotEmpty) {
final desc = leaks.map((item) => '$item').join(', ');
log('Leaking symbols in API: $desc.');

leaksForPackage[package] = leaks.cast();

final report = const JsonEncoder.withIndent(' ').convert(decoded);
log('');
log(report);
}
} else {
throw ProcessException(
Expand Down
2 changes: 1 addition & 1 deletion pkgs/firehose/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: firehose
description: A tool to automate publishing of Pub packages from GitHub actions.
version: 0.10.2-wip
version: 0.10.2
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose

environment:
Expand Down

0 comments on commit a6c37b5

Please sign in to comment.