Skip to content

Detect Objective-C++ and Swift Package Manager files - #39

Merged
sabbaticas merged 2 commits into
mainfrom
feat/objective-cpp-swiftpm-detection
Oct 9, 2026
Merged

sabbaticas merged 2 commits into
mainfrom
feat/objective-cpp-swiftpm-detection

Conversation

@sabbaticas

Copy link
Copy Markdown
Contributor

Closes #38.

Summary

  • .mm now reports as Objective-C++, a new language. It was missing from EXT_FILETYPES and reported Unknown.
  • Package.swift is tagged build, dependencies, Swift and SwiftPM. A Swift package previously looked like it declared no dependencies.
  • Package.resolved is tagged dependencies, Swift and SwiftPM, and reports as JSON instead of Unknown.
  • The Click floor moves from >=8.3.1 to >=8.3.3 so an install can no longer resolve to a vulnerable Click release, and the package author email changes. These are in their own commit.
  • The docs site's hardcoded vocabulary counts and version example are brought up to date.

Before and after

file.mm            []                                            'Unknown'
Package.swift      []                                            'Swift'
Package.resolved   []                                            'Unknown'
file.mm            []                                            'Objective-C++'
Package.swift      ['build', 'dependencies', 'Swift', 'SwiftPM'] 'Swift'
Package.resolved   ['dependencies', 'Swift', 'SwiftPM']          'JSON'

Design notes

  • SwiftPM is the tool's own short name: the official documentation is titled Package Manager (SwiftPM).
  • Package.resolved gets its filetype by basename, not extension. Carthage's Cartfile.resolved shares .resolved and is plain text; a test guards that it is not claimed.
  • The lock file does not carry build, matching uv.lock and pnpm-lock.yaml.

Things to note

  • Swift and SwiftPM are new tags and Objective-C++ is a new language name. All additive, so kospex is unaffected until a re-sync.
  • Vocabulary is now 121 tags, 87 filetypes and 33 languages. The docs pages still showed the 0.0.19 figures (85, 76, 32), so most of that correction predates this change.
  • The version stays at 0.0.21, which is unreleased.

Testing

  • pytest: 721 passed. The twelve new tests were written first; the seven covering new behaviour failed before the change, and the rest are guards against over-claiming.
  • Fixtures added in src/tests/: file.mm, Package.swift, Package.resolved. panopticas assess shows each with the expected language and tags.

🤖 Generated with Claude Code

sabbaticas and others added 2 commits October 9, 2026 13:51
The Click floor moves from >=8.3.1 to >=8.3.3 so an install can no longer
resolve to a vulnerable Click release. CLAUDE.md quoted the old floor.

The package author email is now peter@kospex.io.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
.mm now reports as Objective-C++, a new language. It was missing from
EXT_FILETYPES and reported Unknown.

Package.swift is tagged build, dependencies, Swift and SwiftPM. Its lock
file Package.resolved is tagged dependencies, Swift and SwiftPM and
reports as JSON. A Swift package previously looked like it declared no
dependencies. Package.resolved is mapped by basename because Carthage's
Cartfile.resolved shares the extension and is plain text.

The docs site carried vocabulary counts and a version from 0.0.19. They
now match the code: 121 tags, 87 filetypes, 33 languages.

Closes #38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sabbaticas
sabbaticas merged commit f10abd0 into main Oct 9, 2026
4 checks passed
@sabbaticas
sabbaticas deleted the feat/objective-cpp-swiftpm-detection branch October 9, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect Objective-C++ (.mm) and Swift Package Manager files

1 participant