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

Change the DSL build method to internal #445

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

be-hase
Copy link
Contributor

@be-hase be-hase commented Apr 1, 2025

Motivation

Currently, it is possible to improperly access the build method in the DSL.
This method should ideally be inaccessible.

CleanShot 2025-04-01 at 11 54 27

What

I will change the build method to internal.
However, since it needs to be called from an inline function, it is necessary to add the @PublishedApi annotation.

CleanShot 2025-04-01 at 11 54 07

Note

Strictly speaking, this is a breaking change... but I think it might be acceptable.

@making
Copy link
Owner

making commented Apr 2, 2025

I'm not a Kotlin user and am not familiar with its usage, but why does the build method need to be done inside the DSL?

What inconvenience would arise by not exposing this method?

@be-hase
Copy link
Contributor Author

be-hase commented Apr 3, 2025

Ah, your understanding is wrong. It's the opposite.
Currently, the build method is now publicly exposed. This PR is a change to encapsulate it.

@making
Copy link
Owner

making commented Apr 3, 2025

That makes sense. I'll merge this change in the next minor version (0.15.0).
Thanks for your contribution!

@making making added enhancement New feature or request kotlin breaking labels Apr 3, 2025
@making making merged commit fa19d78 into making:develop Apr 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking enhancement New feature or request kotlin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants