Skip to content

Split out SwiftExtract into swift-binding-generator-core - #957

Merged
ktoso merged 2 commits into
mainfrom
ktoso/split-swift-extract
Nov 9, 2026
Merged

ktoso merged 2 commits into
mainfrom
ktoso/split-swift-extract

Conversation

@ktoso

@ktoso ktoso commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

The SwiftExtract module moved to swiftlang/swift-binding-generator-core. This is in order to facilitate new language targets sharing a common Swift "analysis" core.

This PR makes us depend on that separate package, and allows overriding for local development with SWIFT_BINDING_GENERATOR_CORE_PATH, same as for swift-java-jni-core.

@ktoso
ktoso force-pushed the ktoso/split-swift-extract branch from 4d1b7fd to c24ba38 Compare November 7, 2026 08:01
The `SwiftExtract` library (and `SwiftExtractConfigurationShared`, the
`_StaticBuildConfigPlugin` build tool, and `SwiftExtractTests`) moved to
https://github.com/swiftlang/swift-binding-generator-core, where it is
separately versioned so other binding generators can use it without the Java
tooling.

- Depend on the new package the same way we depend on swift-java-jni-core:
  `branch: "main"`, overridable locally with `SWIFT_BINDING_GENERATOR_CORE_PATH`,
  pinned to a tag by `scripts/release.sh` at release time.
- The release script fetches the latest generator tag the same way it does for
  jni-core, and now fails early with a clear message when the generator repo
  has no tag yet, so a release always pins a specific compatible version
  (the jq query uses `// empty` since an empty tag list yields null).
- Remove the moved products, targets and sources.
- `Plugins/PluginsShared/SwiftExtractConfigurationShared` becomes a vendored
  byte-identical copy (plugins cannot take sources from a dependency); the
  compatibility job in swift-binding-generator-core diffs it against its
  sources.
- Copy the stdlib/SwiftSyntax convenience helpers jextract uses into
  `JExtractSwiftLib/Convenience` as `package` (they stay non-public API).
@ktoso
ktoso force-pushed the ktoso/split-swift-extract branch from c24ba38 to ff58ae4 Compare November 7, 2026 08:03
@ktoso ktoso closed this Nov 7, 2026
@ktoso ktoso reopened this Nov 7, 2026
@ktoso
ktoso force-pushed the ktoso/split-swift-extract branch from 4c2194e to da57fee Compare November 7, 2026 13:03
@ktoso
ktoso force-pushed the ktoso/split-swift-extract branch from da57fee to 11f021d Compare November 7, 2026 13:03
@ktoso ktoso closed this Nov 7, 2026
@ktoso ktoso reopened this Nov 7, 2026
@ktoso ktoso closed this Nov 7, 2026
@ktoso ktoso reopened this Nov 7, 2026
@ktoso
ktoso merged commit acb5c00 into main Nov 9, 2026
166 of 210 checks passed
@ktoso
ktoso deleted the ktoso/split-swift-extract branch November 9, 2026 21:01
piercifani added a commit to skiptools/swift-java that referenced this pull request Nov 12, 2026
…t-binding-generator-core

swiftlang#957 moved SwiftExtract to swiftlang/swift-binding-generator-core.
Our analysis changes now live on skip/integration of
skiptools/swift-binding-generator-core, which Package.swift depends on
(SWIFT_BINDING_GENERATOR_CORE_PATH still overrides it).

Also brings swiftlang#954 (Java keywords, already here), swiftlang#956, swiftlang#958 and swiftlang#960 (protocol
parameter wrappers named after the Java method): kept this branch's
wrappers for protocols of dependencies, named the swiftlang#960 way. Their
tests expect the wrappers' @unchecked Sendable conformance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…d to swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-closures-jextracted-types on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…inding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-codegen-fixes on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…nding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-async-stream on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
… swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-async-throwing-stream on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…ft-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-default-arguments on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
… to swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-closure-struct-arguments on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
… swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-implicit-existentials on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…wift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-protocol-extensions on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…o swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-autoclosure-parameters on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
… swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-extension-thunk-files on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…to swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-enum-unbridged-payloads on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…nding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-self-results on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
… swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-closures-jextracted-types on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…ft-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-closures-jextracted-types on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…inding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-kotlin-output on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…ed to swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-closure-closure-parameters on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-dictionaries-as-maps on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…swift-binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes are now jextract-closure-requirements on piercifani/swift-binding-generator-core, which Package.swift depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
piercifani added a commit to piercifani/swift-java that referenced this pull request Nov 12, 2026
…binding-generator-core

swiftlang#957 moved SwiftExtract out of this repository. This
branch's analysis changes (ExtractDecider.mayExtractMembers(of:),
isExported(_:) and isFromKnownModuleSource) now live in
swift-binding-generator-core, so its edits to the deleted SwiftExtract files
are dropped here. Until that change lands there, build with
SWIFT_BINDING_GENERATOR_CORE_PATH pointing at a checkout that has it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant