From 9b1a0dc70eafd9b04c989b65a32dda7cb6da30f3 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 8 Oct 2025 09:51:29 +0200 Subject: [PATCH 1/3] Relax assumptions on workspaces in firehose --- pkgs/firehose/lib/src/repo.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/firehose/lib/src/repo.dart b/pkgs/firehose/lib/src/repo.dart index 3e174067..dcbdc54e 100644 --- a/pkgs/firehose/lib/src/repo.dart +++ b/pkgs/firehose/lib/src/repo.dart @@ -62,11 +62,8 @@ class Repository { if (pubspecFile.existsSync()) { var pubspec = yaml.loadYaml(pubspecFile.readAsStringSync()) as Map; var publishTo = pubspec['publish_to'] as String?; - if (publishTo != 'none' && !pubspec.containsKey('workspace')) { + if (publishTo != 'none') { packages.add(Package(directory, this)); - // There is an assumption here that published, non-workspace packages do - // not contain nested published packages. - return; } } if (directory.existsSync()) { From e4bb9cc9564ddada089f980d6f620fbff10384d0 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 8 Oct 2025 09:55:55 +0200 Subject: [PATCH 2/3] add return --- pkgs/firehose/lib/src/repo.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/firehose/lib/src/repo.dart b/pkgs/firehose/lib/src/repo.dart index dcbdc54e..7a315541 100644 --- a/pkgs/firehose/lib/src/repo.dart +++ b/pkgs/firehose/lib/src/repo.dart @@ -64,6 +64,9 @@ class Repository { var publishTo = pubspec['publish_to'] as String?; if (publishTo != 'none') { packages.add(Package(directory, this)); + // There is an assumption here that published packages do not contain + // nested published packages. + return; } } if (directory.existsSync()) { From 3dc3f915ac8da31d45c40f8bed65dadd8ca9b701 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 8 Oct 2025 10:05:55 +0200 Subject: [PATCH 3/3] Fix --- pkgs/firehose/CHANGELOG.md | 1 + pkgs/firehose/lib/src/repo.dart | 3 +++ pkgs/firehose/test_data/workspace_repo/pubspec.yaml | 3 +++ 3 files changed, 7 insertions(+) diff --git a/pkgs/firehose/CHANGELOG.md b/pkgs/firehose/CHANGELOG.md index 6ff09896..838d0b47 100644 --- a/pkgs/firehose/CHANGELOG.md +++ b/pkgs/firehose/CHANGELOG.md @@ -3,6 +3,7 @@ - Make the PR health output less verbose by collapsing warnings by default. - Bump dart_apitool to fix errors with equal types being reported as different. - Give comment files in health work. +- Don't ignore workspace pubspecs. ## 0.12.0 diff --git a/pkgs/firehose/lib/src/repo.dart b/pkgs/firehose/lib/src/repo.dart index 7a315541..ab121ff6 100644 --- a/pkgs/firehose/lib/src/repo.dart +++ b/pkgs/firehose/lib/src/repo.dart @@ -63,10 +63,13 @@ class Repository { var pubspec = yaml.loadYaml(pubspecFile.readAsStringSync()) as Map; var publishTo = pubspec['publish_to'] as String?; if (publishTo != 'none') { + print('Found published package at $directory'); packages.add(Package(directory, this)); // There is an assumption here that published packages do not contain // nested published packages. return; + } else { + print('Ignoring non-published package at $directory'); } } if (directory.existsSync()) { diff --git a/pkgs/firehose/test_data/workspace_repo/pubspec.yaml b/pkgs/firehose/test_data/workspace_repo/pubspec.yaml index c4fd0765..a0f3c282 100644 --- a/pkgs/firehose/test_data/workspace_repo/pubspec.yaml +++ b/pkgs/firehose/test_data/workspace_repo/pubspec.yaml @@ -1,4 +1,7 @@ name: workspace + +publish_to: none + workspace: - pkg_1 - pkg_2