Skip to content

Jextract CLI doesn't have a way to pass .swiftinterface files #484

@abdulowork

Description

@abdulowork

The jextract CLI doesn't allow passing .swiftinterface files. I built the CLI with swift build --product swift-java, produced the .swiftinterface with:

xcodebuild clean build -workspace Samples/SwiftJavaExtractFFMSampleApp/ -scheme SwiftJavaExtractFFMSampleApp -destination generic/platform=macOS -derivedDataPath dd SWIFT_EMIT_MODULE_INTERFACE=YES ARCHS=arm64

And tried importing it with:

./.build/arm64-apple-macosx/debug/swift-java jextract --swift-module MySwiftLibrary --input-swift dd/Build/Products/Debug/MySwiftLibrary.swiftmodule/arm64-apple-macos.swiftinterface --java-package com.example.swift --output-swift S1 --output-java J1

This capability seems to be intended from the sources. With a minor tweak here, I was able to get jextract to accept the .swiftinterface file, and it produced a Java API similar to the API it makes from sources.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:jextractIssues related to jextract-swift

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions