Skip to content

Swift extractor internal error: assertion 'found != SwiftMangler::preloadedExtensionOrFilePrivateValueIndexes.end()' failed (declaration not found within parent) #22224

Description

@inequitas

Description

CodeQL's Swift analysis fails with an internal error during GitHub code scanning (default setup) on a public Swift/SwiftPM macOS project:

CodeQL encountered an unexpected internal error with the following message:
Assertion failed: found != SwiftMangler::preloadedExtensionOrFilePrivateValueIndexes.end(). declaration not found within parent
Some or all of the Swift analysis may have failed.

Environment

  • GitHub code scanning default setup, language: swift
  • GitHub-hosted macOS runner
  • Occurred ~2026-07-20, reproducible across scans

Reproduction

Public repo that triggers it: https://github.com/inequitas/performancemonitor — a Swift Package Manager macOS menu-bar app (SwiftUI/AppKit), Swift 5.10 tools, no third-party dependencies. The codebase uses fileprivate/private declarations and extensions extensively, which — given the assertion name (preloadedExtensionOrFilePrivateValueIndexes) — may be related.

Impact

Swift analysis fails/is incomplete, so code scanning produces no reliable Swift results; we've had to disable CodeQL for the repo.

Happy to help narrow down a minimal repro if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions