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

Support empty blocks for configuring functions in DCL #29158

Merged
merged 5 commits into from
May 16, 2024

Conversation

h0tk3y
Copy link
Member

@h0tk3y h0tk3y commented May 15, 2024

  • Support optional configuring blocks for configuring functions (for now, only Kotlin functions and functions produced by custom code are eligible);

  • Make sure that a configuring function is invoked when Declarative data is mapped to JVM objects, even if the configuring function has an empty block or none at all;

  • Invoke the configuring function's JVM counterpart at most once for each receiver when mapping Declarative data to JVM objects (as opposed to an invocation per object access before, which could be even more than the number of call sites in the script).

  • Bonus: support applying software type functions with no configuration block, like softwareType() (rolled back)

Fixes #29161

@h0tk3y h0tk3y requested review from a team as code owners May 15, 2024 14:29
@h0tk3y h0tk3y requested review from eskatos, bamboo, abstratt and tresat and removed request for a team May 15, 2024 14:29
@h0tk3y h0tk3y self-assigned this May 15, 2024
@gitstream-cm gitstream-cm bot requested a review from jbartok May 15, 2024 14:32
@h0tk3y
Copy link
Member Author

h0tk3y commented May 15, 2024

@bot-gradle test this

@bot-gradle
Copy link
Collaborator

I've triggered the following builds for you. Click here to see all build failures.

@h0tk3y h0tk3y force-pushed the sigushkin/declarative-dsl/empty-blocks branch from b91668c to 535bfae Compare May 16, 2024 11:58
@h0tk3y
Copy link
Member Author

h0tk3y commented May 16, 2024

@bot-gradle test this

@bot-gradle
Copy link
Collaborator

I've triggered the following builds for you. Click here to see all build failures.

@h0tk3y h0tk3y added this pull request to the merge queue May 16, 2024
@bot-gradle bot-gradle added this to the 8.9 RC1 milestone May 16, 2024
Merged via the queue into master with commit 361274f May 16, 2024
56 of 57 checks passed
@h0tk3y h0tk3y deleted the sigushkin/declarative-dsl/empty-blocks branch May 16, 2024 17:32
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.

Using a software type with an empty configuration block has no effect in DCL
4 participants