pq / pub_crawl

Crawls, fetches and queries published pub packages. 🍻

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

skip "discontinued" packages in fetch

pq opened this issue · comments

Follow-up from #3 (comment). We should probably just skip packages flagged discontinued.

@jonasfj: is this flag stable? Are there other flags we should take note of?

Thanks!

I doubt the flag will disappear, but no API that exposes it is stable. Though I think https://pub.dartlang.org/api/packages/retry/options is reasonably solid.

This flag can be flipped and unflipped by the owner at anytime.

If you don't already, you can look at the SDK constraint to exclude Dart 1.x packages.

Thanks!

FWIW, we do skip Dart1 packages.

if (!isDart2(package.sdkConstraint)) {
if (verbose) {
print('Skipped package:${package.name} (not Dart2)');
}
continue;
}

(Hardening thanks to @ditman!)