swiftlang / swiftlang/swift-java

`make javakit-generate` generates different `generated/` files.

Open
#201 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
1.2k
Forks
123
Avg merge
1d 7h
Merged PRs (30d)
16

Description

When running make javakit-generate on a freash copy of the project the generated files are changed:

These classes were generated with a different order of methods and variables.

JavaClass.swift
JavaString.swift
BitSet.swift

This class generates a bad translation which is not a valid class.

URLClassLoader.swift

The differences can be found here:

0001-issue-report.patch

swift --version
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0
java --version
openjdk 23 2024-09-17
OpenJDK Runtime Environment Temurin-23+37 (build 23+37)
OpenJDK 64-Bit Server VM Temurin-23+37 (build 23+37, mixed mode, sharing)
machine
M1 chip, 2020
macOS Version 15.2 (24C101)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run make javakit-generate on a fresh copy with the reported Swift and Java versions, then compare the generated files with 0001-issue-report.patch. Focus on JavaClass.swift, JavaString.swift, BitSet.swift, and URLClassLoader.swift; done means generation is reproducible and URLClassLoader.swift is a valid class.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, swift
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.