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

Use List instead of ListProperty for benchmarkParameters values #206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrhee17
Copy link
Contributor

@jrhee17 jrhee17 commented Sep 4, 2021

Motivation

ex) line/armeria#3811

It seems like most usages assume that the parameter values are List rather than ListProperty
ref: https://github.com/search?l=Gradle&p=5&q=benchmarkParameters&type=Code

Using previous code naively, the following exception is raised:

> Error while evaluating property 'benchmarkParameters' of task ':benchmarks:jmh'
   > Failed to calculate the value of task ':benchmarks:jmh' property 'benchmarkParameters'.
      > Failed to query the value of extension 'jmh' property 'benchmarkParameters'.
         > Cannot get the value of a property of type java.util.Map with value type org.gradle.api.provider.ListProperty as the source contains a value of type java.util.ArrayList.

A workaround exists so I wouldn't say this is critical, but I was wondering if this API change was intentional.

Modification

  • Modify addMapOption to receive a List value instead of a ListProperty value

@jrhee17 jrhee17 changed the title Use list for map parameter values Use List instead of ListProperty for map parameter values Sep 4, 2021
@jrhee17 jrhee17 changed the title Use List instead of ListProperty for map parameter values Use List instead of ListProperty for benchmarkParameters values Sep 4, 2021
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