Skip to content

javac plugin: keep parameter names #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 24, 2024
Merged

javac plugin: keep parameter names #108

merged 3 commits into from
Oct 24, 2024

Conversation

ktoso
Copy link
Collaborator

@ktoso ktoso commented Oct 24, 2024

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.

ktoso added 3 commits October 24, 2024 14:40
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.
@ktoso ktoso merged commit e16ef46 into main Oct 24, 2024
11 checks passed
@ktoso ktoso deleted the keep-parameters branch October 24, 2024 07:44
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