Skip to content

[firehose] Fix dart_apitool invocations with pub workspaces #355

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

Merged
merged 5 commits into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"configurations": [
{
"name": "health",
"program": "pkgs/firehose/bin/health.dart",
"program": "${workspaceFolder}/pkgs/firehose/bin/health.dart",
"request": "launch",
"type": "dart",
"env": {
Expand All @@ -16,9 +16,9 @@
"GITHUB_STEP_SUMMARY": "/tmp/github_step_summary_mock.md",
},
"args": [
"--checks",
"version,changelog,license,coverage,do-not-submit,leaking"
]
"--check",
"breaking"
],
}
]
}
}
4 changes: 3 additions & 1 deletion pkgs/firehose/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## 1.0.0-wip
## 0.10.3

- Fix dart_apitool invocation in pub workspaces.

## 0.10.2

Expand Down
10 changes: 4 additions & 6 deletions pkgs/firehose/lib/src/health/health.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ class Health {
log('This list of Flutter packages is $flutterPackages');
for (var package in packagesContaining(filesInPR, ignore: ignored)) {
log('Look for changes in $package');
var relativePath =
path.relative(package.directory.path, from: directory.path);
final absolutePath = package.directory.absolute.path;
var tempDirectory = Directory.systemTemp.createTempSync();
var reportPath = path.join(tempDirectory.path, 'report.json');

Expand All @@ -185,7 +184,7 @@ class Health {
'diff',
'--no-check-sdk-version',
...['--old', getCurrentVersionOfPackage(package)],
...['--new', relativePath],
...['--new', absolutePath],
...['--report-format', 'json'],
...['--report-file-path', reportPath],
],
Expand Down Expand Up @@ -273,8 +272,7 @@ ${changeForPackage.entries.map((e) => '|${e.key.name}|${e.value.toMarkdownRow()}
log('');
log('--- ${package.name} ---');
log('Look for leaks in ${package.name}');
var relativePath =
path.relative(package.directory.path, from: directory.path);
final absolutePath = package.directory.absolute.path;
var tempDirectory = Directory.systemTemp.createTempSync();
var reportPath = path.join(tempDirectory.path, 'leaks.json');

Expand All @@ -295,7 +293,7 @@ ${changeForPackage.entries.map((e) => '|${e.key.name}|${e.value.toMarkdownRow()}
...['pub', 'global', 'run'],
'dart_apitool:main',
'extract',
...['--input', relativePath],
...['--input', absolutePath],
...['--output', reportPath],
];
var runApiTool = runDashProcess(
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: 1.0.0-wip
version: 0.10.3
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose

environment:
Expand Down