Skip to content

Build and path handling adjustments to handle both old build system and swift-build#740

Merged
ktoso merged 4 commits into
swiftlang:mainfrom
ktoso:wip-733-workaround
May 14, 2026
Merged

Build and path handling adjustments to handle both old build system and swift-build#740
ktoso merged 4 commits into
swiftlang:mainfrom
ktoso:wip-733-workaround

Conversation

@ktoso
Copy link
Copy Markdown
Collaborator

@ktoso ktoso commented May 13, 2026

The way we're looking up the swift-java "tool" in plugins uses the target name "SwiftJavaTool" and that is correct in the natrive build system.

In swift 6.4, and in Xcode, the swift-build build system is actually naming them using product names: so swift-java. In order to have the build work in BOTH build systems, we have to make the name be the same... It's a workaround, but it seems to work.

This should resolve the failure

error: Build input file cannot be found: '/Users/ktoso/code/swift-java/Samples/JavaKitSampleApp/.build/out/Products/Debug/SwiftJavaTool'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

that folks were reporting in #733 and in #281

resolves #281
resolves #733

The way we're looking up the swift-java "tool" in plugins uses the
target name "SwiftJavaTool" and that is correct in the natrive build
system.

In swift 6.4, and in Xcode, the swift-build build system is actually
naming them using product names: so swift-java. In order to have the
build work in BOTH build systems, we have to make the name be the
same... It's a workaround, but it seems to work.

This should resolve the failure

```
error: Build input file cannot be found: '/Users/ktoso/code/swift-java/Samples/JavaKitSampleApp/.build/out/Products/Debug/SwiftJavaTool'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?
```

that folks were reporting in swiftlang#733 and in swiftlang#281
@ktoso ktoso force-pushed the wip-733-workaround branch from 2424390 to eeb6514 Compare May 13, 2026 05:07
@ktoso ktoso force-pushed the wip-733-workaround branch from eeb6514 to ab757db Compare May 13, 2026 07:59
@ktoso ktoso force-pushed the wip-733-workaround branch from a037e91 to e680ada Compare May 13, 2026 10:26
@ktoso ktoso changed the title adjust product name to survive new build system Build and path handling adjustments to handle both old build system and swift-build May 13, 2026
@ktoso ktoso mentioned this pull request May 13, 2026
@ktoso
Copy link
Copy Markdown
Collaborator Author

ktoso commented May 14, 2026

I'll put up PRs to revert workarounds as the root causes get fixed

@ktoso ktoso merged commit 36c62f8 into swiftlang:main May 14, 2026
73 checks passed
@ktoso ktoso deleted the wip-733-workaround branch May 14, 2026 04:47
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.

Build broken with swift-build / swift 6.4-nightly default build mode Xcode integration broken

1 participant