Skip to content

feat(koin): add koin module (runtime DI deps + frameworkModule) - #9

Closed
Ziedelth wants to merge 1 commit into
masterfrom
feat/koin-module
Closed

feat(koin): add koin module (runtime DI deps + frameworkModule)#9
Ziedelth wants to merge 1 commit into
masterfrom
feat/koin-module

Conversation

@Ziedelth

Copy link
Copy Markdown
Contributor

Ajoute un sous-module koin au framework :\n- expose koin-bom / koin-core / koin-annotations en api() (versions centralisées dans le catalog) ;\n- fournit un frameworkModule() de base pour démarrer Koin.\n\nPublie vers GitHub Packages (convention maven-publish existante).\n\n⚠️ Le plugin binaire testé pour cacher le Koin compiler plugin a été retiré : la distribution du plugin io.insert-koin.compiler.plugin (version séparée 1.0.2) et l'application runtime d'un plugin par un autre plugin Gradle se sont révélées non fiables/non vérifiables — voir discussion.

@Ziedelth Ziedelth left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Hermes — PR #9 (fan-out 3 reviewers neutres : mon modèle + gpt-5.6-sol high + kimi-k3 max, sans contexte de conversation)

Verdict : Commentaire — 3 points sûrs, dont 1 conforme à une guideline explicite (TESTING §6). ✅ :koin:build OK, api() conforme « Dependency Sharing », style/KDoc/English OK.

🟠 Guideline (vérifiée)

  • koin/src/main/kotlin/KoinModule.kt:12 — API publique frameworkModule() sans test → viole TESTING.md §6 (« a public API change without a corresponding test is an incomplete change »). Ajouter un test minimal (charger le module via Koin et vérifier le démarrage).

🔵 Qualité (vérifié)

  • gradle/libs.versions.toml:46 (+ :15)koinGradlePlugin et sa version koinCompiler sont mortes : aucune référence dans le repo (scan complet) — vestige du plugin abandonné. Les retirer.
  • koin/src/main/kotlin/KoinModule.kt:12-13module { } vide : le KDoc annonce des définitions qui n'existent pas. Soit retirer frameworkModule() tant qu'il n'y a rien à enregistrer (le module reste le porteur des deps via api(...)), soit y ajouter la première définition réelle.
⚠️ Points incertains / à trancher ensemble
  • Bundle koinEcosystem ? : le repo groupe ses deps en bundles (ktorServerEcosystem…) ; ici 3 api(...) individuels. Non écrit dans les guidelines → [UNCERTAIN], à voir avec toi.
  • À quoi sert le module sans définitions ? : le sous-module koin n'est pour l'instant qu'un porteur de dépendances (koin-core/koin-annotations via api) + un frameworkModule() vide. Est-ce le rôle voulu, ou doit-il porter de vraies définitions framework ?
  • Worker (PR #21) : sa CI passera après la publication du module koin (merge framework + push master) — dépendance d'ordonnancement.

Révisé par Hermes (fan-out 3 modèles neutres).

* Provides a single place to register framework-wide definitions. Consumer services can compose it
* with their own modules when starting Koin.
*/
fun frameworkModule(): Module =

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Guideline (TESTING.md §6) : frameworkModule() est une API publique du framework sans test (« a public API change without a corresponding test is an incomplete change »). Ajouter un test minimal : démarrer Koin avec frameworkModule() et vérifier le chargement.

* with their own modules when starting Koin.
*/
fun frameworkModule(): Module =
module { }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Qualité : module { } est vide — le KDoc annonce un « single place to register framework-wide definitions » mais aucune n'existe. Retirer frameworkModule() tant qu'il n'y a pas de définition réelle à enregistrer (le module reste le porteur des deps via api(...)), ou y ajouter la première définition.

Comment thread gradle/libs.versions.toml
koinBom = { module = "io.insert-koin:koin-bom", version.ref = "koin" }
koinCore = { module = "io.insert-koin:koin-core" }
koinAnnotations = { module = "io.insert-koin:koin-annotations" }
koinGradlePlugin = { module = "io.insert-koin:koin-gradle-plugin", version.ref = "koinCompiler" }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Qualité (vérifié) : koinGradlePlugin (+ la version koinCompiler ligne 15) sont inutilisés dans tout le repo (scan complet) — vestige du wrapper abandonné. Les retirer du catalog.

@Ziedelth Ziedelth left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Hermes (complément) — reviewer principal (fan-out neutre)

Vérifié dans le repo : 4 points supplémentaires au premier tour de review.

Détail
  • koin/AGENTS.md manquant : tous les modules du framework (core, cache, exposed, validator, ktor) ont un AGENTS.md dédié (règle « Submodule Rules » du root AGENTS.md) ; le nouveau module koin n'en a pas — incohérence de structure.
  • guidelines/ARCHITECTURE.md non mis à jour : la liste « Module Responsibilities » + le diagramme de dépendances n'incluent pas koin.
  • settings.gradle.kts sans newline terminale : pré-existant sur master, mais la PR touche exactement ces lignes.
  • koinGradlePlugin = config cassée : version.ref = "koinCompiler" (1.0.2) pointe vers io.insert-koin:koin-gradle-plugin:1.0.2 qui n'existe pas (404 — les versions de cet artefact suivent la ligne de koin : 4.2.2 ; 1.0.2 est une version de koin-ksp-compiler). Une entrée de plugin Gradle va dans [plugins], pas [libraries].

Comment thread koin/build.gradle.kts
@@ -0,0 +1,9 @@
plugins {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Structure (vérifié) : tous les modules du framework (core, cache, exposed, validator, ktor) ont un AGENTS.md dédié (règle « Submodule Rules » du root AGENTS.md) — le nouveau module koin n'en a pas. Ajouter un koin/AGENTS.md bref (portée du module + conventions Koin). Idem : guidelines/ARCHITECTURE.md (liste « Module Responsibilities » + diagramme) ne mentionne pas koin.

Comment thread settings.gradle.kts
":ktor",
":cache"
":cache",
":koin"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Nit (vérifié) : fichier sans newline terminale (pré-existant sur master, mais la PR modifie exactement ces lignes) — en profiter pour terminer par un \n.

Comment thread gradle/libs.versions.toml
junitJupiter = "6.1.2"
mockk = "1.14.11"
koin = "4.2.2"
koinCompiler = "1.0.2"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Config cassée (vérifié) : koinGradlePlugin avec version.ref = "koinCompiler" (1.0.2) pointe vers io.insert-koin:koin-gradle-plugin:1.0.2 qui n'existe pas (404 ; les versions de cet artefact suivent koin : 4.2.2 ; 1.0.2 est une version de koin-ksp-compiler). De plus une entrée de plugin Gradle va dans [plugins], pas [libraries]. Supprimer les deux entrées tant qu'aucun consommateur n'en a besoin (ou les déclarer correctement dans [plugins]).

@Ziedelth Ziedelth closed this Aug 13, 2026
@Ziedelth
Ziedelth deleted the feat/koin-module branch August 13, 2026 17:48
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.

1 participant