diff --git a/distage/distage-extension-plugins/src/main/scala/izumi/distage/plugins/PluginConfig.scala b/distage/distage-extension-plugins/src/main/scala/izumi/distage/plugins/PluginConfig.scala index 5ade906530..63be22fd3a 100644 --- a/distage/distage-extension-plugins/src/main/scala/izumi/distage/plugins/PluginConfig.scala +++ b/distage/distage-extension-plugins/src/main/scala/izumi/distage/plugins/PluginConfig.scala @@ -43,11 +43,23 @@ object PluginConfig extends PluginConfigStatic { def packages(packagesEnabled: Seq[String]): PluginConfig = PluginConfig(packagesEnabled, Nil, cachePackages = false, debug = false, Nil, Nil) def packagesThisPkg(implicit pkg: SourcePackageMaterializer): PluginConfig = packages(pkg.get.pkg) - /** Create a [[PluginConfig]] that simply contains the specified modules */ - def const(plugins: Seq[ModuleBase]): PluginConfig = PluginConfig(Nil, Nil, cachePackages = false, debug = false, plugins, Nil) + /** Create a [[PluginConfig]] that simply contains the specified plugins */ + def const(plugins: Seq[PluginBase]): PluginConfig = PluginConfig(Nil, Nil, cachePackages = false, debug = false, plugins, Nil) - /** Create a [[PluginConfig]] that simply contains the specified modules */ - def const(plugin: ModuleBase): PluginConfig = const(Seq(plugin)) + /** Create a [[PluginConfig]] that simply contains the specified plugin */ + def const(plugin: PluginBase): PluginConfig = const(Seq(plugin)) + + /** + * Like [[const]], but accepts simple [[ModuleBase]]. + * Unlike for inheritors of [[PluginDef]], changing a ModuleDef source code may not trigger recompilation of compile-time checks + */ + def constUnchecked(modules: Seq[ModuleBase]): PluginConfig = PluginConfig(Nil, Nil, cachePackages = false, debug = false, modules, Nil) + + /** + * Like [[const]], but accepts simple [[ModuleBase]]. + * Unlike for inheritors of [[PluginDef]], changing a ModuleDef source code may not trigger recompilation of compile-time checks + */ + def constUnchecked(module: ModuleBase): PluginConfig = constUnchecked(Seq(module)) /** A [[PluginConfig]] that returns no plugins */ lazy val empty: PluginConfig = const(Nil)