swiftlang / swift-java

Apache License 2.0
724 stars 27 forks source link

javac plugin: keep parameter names #108

Closed ktoso closed 3 weeks ago

ktoso commented 3 weeks ago

By adding -parameters when we build java code using the java compiler plugin we retain parameter names and therefore we get:

  func sayHello(_ x: Int32, _ y: Int32) -> Int32

rather than

  func sayHello(_ arg0: Int32, _ arg1: Int32) -> Int32

which is a slightly nicer developer experience.

When using with already built jars we can't influence that, but whenever using with java sources we actually build we should recommend keeping that flag probably.