Skip to content

Fix include Person provider to CLI Introspector#286

Merged
serpro69 merged 4 commits intoserpro69:masterfrom
diydriller:GH-94
Dec 3, 2025
Merged

Fix include Person provider to CLI Introspector#286
serpro69 merged 4 commits intoserpro69:masterfrom
diydriller:GH-94

Conversation

@diydriller
Copy link
Contributor

Changes

  • Modified provider filter to include Person::class explicitly
  • Added Person method overloads for native image support

Closes: #94

@serpro69 serpro69 added enhancement 🚀 New feature or request bot 🤖 Issue related to faker-bot functionality labels Dec 2, 2025
@serpro69 serpro69 added this to the 2.0.0 milestone Dec 2, 2025
@serpro69
Copy link
Owner

serpro69 commented Dec 2, 2025

Hi @diydriller , thanks for your contribution!
It seems there's still something missing in reflect configuration for native images:

Error: Exception in thread "main" kotlin.reflect.jvm.internal.KotlinReflectionInternalError: Could not compute caller for function: public final fun birthDate(age: kotlin.Long, at: java.time.LocalDate = ...): java.time.LocalDate defined in io.github.serpro69.kfaker.provider.Person[DeserializedSimpleFunctionDescriptor@26001802] (member = null)

I'll try to check it out and fix tomorrow when I'm at my pc where I have graal sdk installed.

@diydriller
Copy link
Contributor Author

diydriller commented Dec 2, 2025

@serpro69
I made a fix based on the error message and successfully built and tested the native image.

  • change the parameter type of the method to a primitive type when registering a method generated by @JvmOverload in reflect-config.json.
  • add Person.birthDate processing to Renderer.kt.
  • register a birthDate$default method in reflect-config.json because the callBy method internally calls the $default method.

Can you confirm?

@serpro69
Copy link
Owner

serpro69 commented Dec 3, 2025

@serpro69 I made a fix based on the error message and successfully built and tested the native image. Can you confirm?

Looks to be working, thanks!

@serpro69 serpro69 merged commit 2aacff8 into serpro69:master Dec 3, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot 🤖 Issue related to faker-bot functionality enhancement 🚀 New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 'person' to cli-bot

2 participants