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

Baseline applies the -parameters javac option for method parameter metadata #1690

Merged
merged 2 commits into from
Mar 18, 2021

Conversation

carterkozak
Copy link
Contributor

Before this PR

No parameter metadata.

After this PR

This produces bytecode with method parameter metadata to support
more powerful reflection features and stronger automated migrations.
==COMMIT_MSG==
Baseline applies the -parameters javac option for method parameter metadata
==COMMIT_MSG==

Possible downsides?

Not sure how to test this. The change is pretty simple though, and we don't need to worry about applying the -parameters option twice because javac doesn't mind.

@changelog-app
Copy link

changelog-app bot commented Mar 17, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Baseline applies the -parameters javac option for method parameter metadata

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from CRogers March 17, 2021 21:07
…metadata

This produces bytecode with method paramter metadata to support
more powerful reflection features and stronger error-prone
automated migrations.
project.getTasks()
.withType(JavaCompile.class)
.configureEach(javaCompileTask ->
javaCompileTask.getOptions().getCompilerArgs().add("-parameters"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked to see if there was any downsides of doing this and found these: https://stackoverflow.com/a/44075684/139766. None of them seem that bad.

@policy-bot policy-bot bot requested a review from CRogers March 18, 2021 12:13
@CRogers
Copy link
Contributor

CRogers commented Mar 18, 2021

👍

@bulldozer-bot bulldozer-bot bot merged commit a008217 into develop Mar 18, 2021
@bulldozer-bot bulldozer-bot bot deleted the ckozak/apply_parameters branch March 18, 2021 12:14
@svc-autorelease
Copy link
Collaborator

Released 3.75.0

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

Successfully merging this pull request may close these issues.

None yet

3 participants