Skip to content

Bug: Swift framework detection never matches SnapshotTesting or SwiftLog #585

Closed

Description

@vibgrate-team

Context

KNOWN_SWIFT_FRAMEWORKS in src/core-open/scanners/swift-scanner.ts is looked up with the dependency name lowercased (taken from the last part of the package URL). Two entries can never match:

  • 'snapshotTesting' has an uppercase letter, and the package URL is swift-snapshot-testing anyway.
  • 'swiftlog' does not match the real package name swift-log.

So projects using those libraries never show them under detected frameworks.

What to do

  • Key the map on the lowercased repository names actually used in URLs (swift-snapshot-testing, swift-log), and check the other entries the same way.
  • Consider adding a small test that every key is lowercase.
  • Add a unit test for the two cases above.

Acceptance

  • A Package.swift depending on swift-snapshot-testing and swift-log reports SnapshotTesting and SwiftLog as frameworks.
  • A test fails if a key in the map is not lowercase.

Activity

  1. added
    bug
    good first issue
    on Nov 4, 2026
  2. vibgrate-team commented on Nov 4, 2026

    @vibgrate-team
    ContributorAuthor

    Confirmed: the lookup in swift-scanner.ts lowercases the dependency name (dep.name.toLowerCase()) and then checks KNOWN_SWIFT_FRAMEWORKS, but the map has 'snapshotTesting' and 'swiftlog', which can never match the URL-derived names swift-snapshot-testing and swift-log.

    This is a nice small first contribution: fix the two keys, add a test that every key equals its own toLowerCase(), and a Package.swift fixture test for the two libraries.

  3. added a commit that references this issue on Nov 11, 2026
    574e3a2
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

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions