You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a project with a subproject in it the enablePlugins(FooPlugin) cannot find the plugin if it is added in the meta-build of the subproject, while I think this should be the case because sbt is recusive.
Reproduction steps
Create a sbt project with a subproject with the following structure:
name :="projectwithplugins"lazyvalroot= project.in(file(".")).aggregate(site)
lazyvalsite= project.in(file("site"))
build.sbt (sub) the Play Framework is used as an example of an plugin that needs to be enabled explicitly:
name :="test-site"
enablePlugins(PlayJava)
site/project/plugins.sbt:
// The Play plugin
addSbtPlugin("com.typesafe.play"%"sbt-plugin"%"2.6.16")
If you run sbt on this configuration it will fail with the error:
/home/job/Development/test-enablePlugins/site/build.sbt:3: error: not found: value PlayJava
enablePlugins(PlayJava)
If you then copy the site/project/plugins.sbt to project/plugins.sbt it works, but this is not what is expected.
Problem
enablePlugins can not find plugins added by the meta-build in site/project/plugins.sbt
Expectation
Sbt is recusive and the meta-build builds the definitions for the subprojects build. The meta-build is executed as seen by downloading of packages, but the plugins are then not found by enablePlugins, while you would expect the plugins to be loaded and could be found by enablePlugins.
Notes
sbt version: 1.2.3
The text was updated successfully, but these errors were encountered:
Currently sbt recurses into project/ directory, but not the subprojects to discover metabuild.
I don't know if we should keep drilling into directories after directories to achieve this.
What might be interesting would be to come up with a notation where part of the *.sbt is read ahead of time as if it is project/plugin.sbt:
lazyvalapp= (project in file("."))
@metabuild lazyvalplugins=Seq(
addSbtPlugin("com.typesafe.play"%"sbt-plugin"%"2.6.16")
)
If you have a project with a subproject in it the
enablePlugins(FooPlugin)
cannot find the plugin if it is added in the meta-build of the subproject, while I think this should be the case because sbt is recusive.Reproduction steps
Create a sbt project with a subproject with the following structure:
build.sbt (root):
build.sbt (sub) the Play Framework is used as an example of an plugin that needs to be enabled explicitly:
site/project/plugins.sbt:
If you run sbt on this configuration it will fail with the error:
If you then copy the
site/project/plugins.sbt
toproject/plugins.sbt
it works, but this is not what is expected.Problem
enablePlugins can not find plugins added by the meta-build in
site/project/plugins.sbt
Expectation
Sbt is recusive and the meta-build builds the definitions for the subprojects build. The meta-build is executed as seen by downloading of packages, but the plugins are then not found by enablePlugins, while you would expect the plugins to be loaded and could be found by enablePlugins.
Notes
sbt version: 1.2.3
The text was updated successfully, but these errors were encountered: