Skip to content

Conversation

@ktoso
Copy link
Collaborator

@ktoso ktoso commented Dec 1, 2025

This is a specific approach intended to remove the need to split the swift-java repository into more repositories.

The intended goal is to allow libraries to depend on swift-java WITHOUT having to depend on:

  • swift-syntax (which @java... macros depend on)
  • any of the swift-java command line tool's dependencies

This design effectively means that a library just using the "no dependencies" pieces of swift-java would depend on it this way:

dependencies: [
    .package(
        ... swift-java ...
         // Disable all the dependencies SwiftJava Tool,
         // and macros are pulling otherwise
        traits: []
    ),
],

By "not enabling" the default traits, such library will NOT built swift-syntax and any of the other dependencies.

If another dependency, e.g. an application, also used SwiftJava and DID use the macros, these traits would become enabled -- as the developer intended -- however that is not a problem for the "middle" libraries, such as Skip which would not have to enable any of these traits nor care about the dependencies.

--

In addition to that, all dependencies of swift-java WILL promise to support Android shortly, as soon as we figure out some organizational things about them.

@ktoso ktoso force-pushed the wip-dependency-traits branch from f4a5aa2 to a4547a1 Compare December 15, 2025 07:50
@ktoso ktoso marked this pull request as ready for review December 16, 2025 13:58
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