Skip to content

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

Open
ktoso wants to merge 1 commit into
mainfrom
ktoso/split-swift-extract
Open

ktoso wants to merge 1 commit 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
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