-
Notifications
You must be signed in to change notification settings - Fork 448
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
[Request] A handle to turn off inline
modifier in generated optic|product
s.
#1494
Comments
I'm not sure there is a strong reason why we are inlining those and can probably be turned off for all codegen stuff. //cc @nomisRev |
This is fixed by annotating with |
@pakoito it worked. /marvel-github/business/build/generated/source/kaptKotlin/main/product.com.example.marvel.domain.model.api.employee.employeeCreateCommand.kt: (62, 133):
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Long?
e: /marvel-github/business/build/generated/source/kaptKotlin/main/product.com.example.marvel.domain.model.api.employee.employeeCreateCommand.kt: (62, 142):
Type mismatch: inferred type is Long? but Long was expected
You can go clone this -> https://github.com/soberich/marvel and execute EDIT:And also |
Not supporting nullables seems like an oversight on the processor. Just for the sake of testing could you please change id from On the philosophical level, you shouldn't use your storage format for domain, even if the mapping is almost 1:1, because of issues like this. |
Yes, look into the processor for optics: Send a PR removing them and tag @nomisRev |
What version are you currently using?
0.9.1-SNAPSHOT
What would you like to see?
A handle to turn off
inline
modifier in generatedoptic|product
s.Use case:
Mapping via copy method between projections to reduce boilerplate.
Achieved via inheritance by delegation. Similar as described here.
https://tp21.se/blog/2017/12/07/dto-mapping-in-kotlin/
to not to expose
delegate
to outside world at leaseinternal
modifier is desirable.Resulting
Public-API inline function cannot access non-public-API 'internal final val delegate: Record defined in com.example.marvel.domain.model.api.record.RecordDto'
Should we make a handle to turn
inline
off?The text was updated successfully, but these errors were encountered: