You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Package.swift dependencies using a range operator, name: first, or a registry id: are dropped #589
parsePackageSwift in src/core-open/scanners/swift-scanner.ts only matches .package(url: "...", ... from|exact|upToNextMajor|revision|branch: "..."). These valid SwiftPM forms produce no row at all:
Confirmed: parsePackageSwift in src/core-open/scanners/swift-scanner.ts only matches .package(url: ..., from|exact|upToNextMajor|revision|branch: ...), so range operators, name:-first calls and registry id: dependencies are dropped.
Rather than one larger regex, it may be simpler to find each .package( call, take its argument text up to the matching ), and then pull url: or id:, an optional name:, and the version from a range ("a"..<"b" or "a"..."b", using the lower bound) or a labelled form. Local .package(path:) can be skipped explicitly. A test per form in the issue would cover it well.
Activity
vibgrate-team commentedon Nov 4, 2026
Confirmed:
parsePackageSwiftinsrc/core-open/scanners/swift-scanner.tsonly matches.package(url: ..., from|exact|upToNextMajor|revision|branch: ...), so range operators,name:-first calls and registryid:dependencies are dropped.Rather than one larger regex, it may be simpler to find each
.package(call, take its argument text up to the matching), and then pullurl:orid:, an optionalname:, and the version from a range ("a"..<"b"or"a"..."b", using the lower bound) or a labelled form. Local.package(path:)can be skipped explicitly. A test per form in the issue would cover it well.fix(swift): parse Package.swift ranges, name-first calls, and registr…