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

Api: Rework YataganReflection to improve usability. #53

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

Jeffset
Copy link
Contributor

@Jeffset Jeffset commented Apr 19, 2023

YataganReflection runtime API is replaced with properties
file in java resources to simplify reflection setup by hand
(no complicated source directories setup is strictly necessary).

All required parameters, including validation delegate class name
is read from META-INF/com.yandex.yatagan.reflection/parameters.properties.

Such file can be automatically generated by a gradle plugin
based on DSL setup.

Also, this CL removes "validation-less" mode for reflection,
as it has questionable applicability to any real environment,
so there's no point in supporting such a mode.

Now reflection's validation defaults to SimpleDynamicValidationDelegate, which has reasonable defaults
to synchronously check graphs upon creation.

@Jeffset
Copy link
Contributor Author

Jeffset commented Apr 19, 2023

This is a preparation for #31

@Jeffset Jeffset marked this pull request as ready for review April 19, 2023 08:23
@Jeffset
Copy link
Contributor Author

Jeffset commented Apr 19, 2023

Another change here is, that RichString is no longer accessible in reflection logger (plain String is used instead). The formatting setting in turn is unified with codegen using the usePlainOutput option.

rt/engine/src/main/kotlin/RuntimeEngine.kt Outdated Show resolved Hide resolved
`YataganReflection` runtime API is replaced with properties
 file in java resources to simplify reflection setup by hand
 (no complicated source directories setup is strictly necessary).

All required parameters, including validation delegate class name
 is read from `META-INF/com.yandex.yatagan.reflection/parameters.properties`.

Such file can be automatically generated by a gradle plugin
 based on DSL setup.

Also, this CL removes "validation-less" mode for reflection,
 as it has questionable applicability to any real environment,
 so there's no point in supporting such a mode.

Now reflection's validation defaults to `SimpleDynamicValidationDelegate`, which has reasonable defaults
 to synchronously check graphs upon creation.
@Jeffset Jeffset merged commit b960579 into main Apr 19, 2023
@Jeffset Jeffset deleted the reflection-api-rework2 branch April 19, 2023 14:31
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.

None yet

3 participants