Skip to content

Enhancement: take the latest Swift, Dart and PHP versions from the release catalog instead of hard-coded constants #586

Closed

Description

@vibgrate-team

Context

Runtime lag for Python and Go comes from the release catalog (latestStable(catalog, 'python') in python-scanner.ts, latestStable(catalog, 'go') in go-scanner.ts). Swift, Dart and PHP still use fixed constants in their scanners:

  • LATEST_SWIFT = { major: 6, minor: 0 } in swift-scanner.ts
  • LATEST_DART = { major: 3, minor: 6 } in dart-scanner.ts
  • LATEST_PHP = { major: 8, minor: 4 } in php-scanner.ts

Newer releases have shipped since (for example Swift 6.2, Dart 3.10 and PHP 8.5, all in 2025), so projects already on those versions are compared against an old baseline and the lag figures go stale with every release.

What to do

  • Read the latest Swift, Dart and PHP versions from the same catalog the Python and Go scanners use (adding entries to the catalog if they are missing).
  • Fall back cleanly (no runtime lag, not a wrong one) when the catalog has no entry or the run is offline without a cached catalog.
  • Add unit tests with a stubbed catalog.

Acceptance

  • No hard-coded latest-version constant remains in the three scanners.
  • With a stubbed catalog, a project on the newest version shows zero lag and an older one shows the expected lag.
  • Missing catalog data leaves runtime lag unset rather than guessed.

Activity

  1. added
    enhancement
    on Nov 4, 2026
  2. vibgrate-team commented on Nov 4, 2026

    @vibgrate-team
    ContributorAuthor

    Confirmed: LATEST_SWIFT (6.0), LATEST_DART (3.6) and LATEST_PHP (8.4) are hard-coded constants in their scanners, while Python and Go use latestStable(catalog, ...).

    Worth checking first whether the release catalog already has swift, dart and php entries; if not, they need adding there before the scanners can switch. When the catalog has no entry, leave runtimeLatest / runtimeMajorsBehind unset rather than falling back to a constant, as the issue says. A stubbed catalog in the tests keeps them offline and stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions