[BUG] [KOTLIN-MISK] Generated Gradle settings include nonexistent :models project
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 88/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- kotlin
- Ambito
- build-system
Direzione di ricerca
Inizia da modules/openapi-generator/src/main/resources/kotlin-misk/settings.gradle.kts.mustache e confrontalo con i file settings.gradle.kts generati in samples/server/petstore/kotlin-misk e kotlin-misk-config. Rigenera entrambi i samples, quindi importali o configurali con Gradle per confermare che il progetto inesistente :models non sia più referenziato. Aggiungi l’asserzione di regressione o il controllo di build descritto nell’issue se i test esistenti forniscono un punto di ingresso adatto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue? The checked-in Kotlin Misk samples reproduce it without a separate specification.
- Have you validated the input using an OpenAPI validator? Not applicable; the failure is in the generated Gradle settings.
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
Description
The Kotlin Misk generator emits the following line in settings.gradle.kts:
include(":models")
However, it does not generate a models Gradle subproject. Gradle therefore reports that the build configures a project whose directory does not exist.
With Gradle 9.2.0, importing the checked-in samples produces a Problems Report containing:
Configuring project ':models' without an existing directory is not allowed.
The configured projectDirectory '.../samples/server/petstore/kotlin-misk/models'
does not exist, can't be written to or is not a directory.
The problem affects both checked-in samples:
samples/server/petstore/kotlin-misksamples/server/petstore/kotlin-misk-config
It also causes Gradle to create untracked files such as:
samples/server/petstore/kotlin-misk/build/reports/problems/problems-report.html
samples/server/petstore/kotlin-misk-config/build/reports/problems/problems-report.html
openapi-generator version
Current master (7.26.0 at the time of reporting).
The problematic line was introduced with the Kotlin Misk generator in commit d81b5a37d12fad974dad55ea0f8dee8a36cfbf12 / #20885 and remains present in the current template.
OpenAPI declaration file content or url
No separate OpenAPI declaration is required. The checked-in Kotlin Misk samples reproduce the issue.
Generation Details
The source template contains the invalid project inclusion:
modules/openapi-generator/src/main/resources/kotlin-misk/settings.gradle.kts.mustache
include(":models")
The generated sample settings contain the same line:
samples/server/petstore/kotlin-misk/settings.gradle.kts
samples/server/petstore/kotlin-misk-config/settings.gradle.kts
Neither sample contains a models directory, and repository history does not show such a subproject previously existing at either location.
Steps to reproduce
- Check out the latest
master. - Import
samples/server/petstore/kotlin-miskas a Gradle project using Gradle 9.2.0, or open the repository in VS Code with the Microsoft Gradle extension enabled. - Allow Gradle project discovery/configuration to run.
- Open
samples/server/petstore/kotlin-misk/build/reports/problems/problems-report.html. - Observe the warning that project
:modelsis configured without an existing directory. - Repeat with
samples/server/petstore/kotlin-misk-configand observe the same result.
Actual output
Gradle reports:
Configuring project ':models' without an existing directory is not allowed.
Expected output
The generated Kotlin Misk project should contain only valid Gradle project declarations and should configure successfully without referring to a nonexistent subproject.
Related issues/PRs
- #20885 added the Kotlin Misk generator and the
include(":models")declaration. - #21165 subsequently updated the Kotlin Misk generator but retained the declaration.
Suggest a fix
Remove the following line from:
modules/openapi-generator/src/main/resources/kotlin-misk/settings.gradle.kts.mustache
include(":models")
Then regenerate both Kotlin Misk samples and add a regression assertion or build check that ensures generated Gradle subprojects refer to existing directories.
- Lingua principale
- Java
- Stelle
- 26.8k
- Fork
- 7.7k
- Merge medio
- 3g 21h
- PR unite (30g)
- 117
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenAPITools/openapi-generator
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
OpenAPITools/openapi-generator#24997 ·
I maintainer di solito rispondono entro 1 giorno
-
Issue: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenAPITools/openapi-generator#24859 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG][KOTLIN] Fails to compile after updating to 7.25.0 with useJackson3=false useSpringBoot4=trueApertaIssue: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
OpenAPITools/openapi-generator#24842 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
OpenAPITools/openapi-generator#24830 ·
I maintainer di solito rispondono entro 1 giorno
-
Issue: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OpenAPITools/openapi-generator#24816 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OpenAPITools/openapi-generator
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
redhat-developer/intellij-quarkus#1626 ·
-
Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
wso2/product-integrator-mi#5061 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
quarkiverse/quarkus-roq#1277 ·
I maintainer di solito rispondono entro 1 giorno
-
Typos in page footerAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
apache/logging-site#48 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/maven-surefire#3496 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno