Skip to content
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

[Feature] Generate metadata for method parameters #1368

Closed
helpermethod opened this issue Aug 30, 2023 · 1 comment · Fixed by #1370
Closed

[Feature] Generate metadata for method parameters #1368

helpermethod opened this issue Aug 30, 2023 · 1 comment · Fixed by #1370

Comments

@helpermethod
Copy link

I am currently using KotlinPoet and Classgraph to generate a Kotlin DSL on top of playwright-java. This works fine, but the bytecode does not contain any parameter names.

It would be great if the parameter names could be generated during compilation. This is as easy as adding a single property

https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#parameters

or and additional argument to the maven-compiler-plugin

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <compilerArgs>
            <arg>-parameters</arg>
          </compilerArgs>
        </configuration>
      </plugin>

As far as I am aware, this would have no drawbacks (except maybe adding a few bytes to the resulting byte code).

@yury-s
Copy link
Member

yury-s commented Aug 30, 2023

Should be a safe change. Would you send a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants