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

Gradle Caching Interference with Entity Enhancement in Kotlin Project #3938

Open
nekozlov opened this issue Nov 27, 2024 · 0 comments
Open
Labels
triage Issue is waiting for triage type: bug Something isn't working

Comments

@nekozlov
Copy link

Environment

Jmix version: <4.2.1>

Bug Description

The project is written in Kotlin (version 2.0.21). In the gradle.properties file, org.gradle.caching=true is set. When running the gradle clean task, the .build directory is deleted, along with the entitiesEnhancing folder inside it, which contains the persistence.xml file with the project's entities. Then, when executing the gradle build task, the compileKotlin task is skipped, and the result is fetched from the cache. As a result, the EnhancingAction#execute task does not run, and the entitiesEnhancing folder with persistence.xml is not added to the .build directory. When the application starts and I try to log in via the login view, I get the following exception:

Exception Description: Problem compiling [select e from User e where e.username = :username]. 
[14, 18] The abstract schema type 'User' is unknown.
[27, 37] The state field path 'e.username' cannot be resolved to a valid type.

Changing org.gradle.caching=true to org.gradle.caching=false resolves this issue.

@nekozlov nekozlov added triage Issue is waiting for triage type: bug Something isn't working labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue is waiting for triage type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant