-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Regression with application configuration discovery in test mode for sub-projects #1695
Comments
Interestingly enough, even when adding the plugin explicitly in |
The issue is present in 2.2.0 final as well, it seems |
Ok, I have a test application that demonstrates the issue: https://github.com/manuelbernhardt/issue-1695 My findings so far:
|
More findings: this is not related to plugins, but to the application configuration discovery. It seems that prior to 2.2, a sub-project would "inherit" the configuration of the root play project, whilst now this doesn't happen any longer. I was biased by the plugin lookup not working, and had overlooked that this particular plugin was in fact counting on having some configuration keys set in So in essence, one work-around for this regression is to instruct any tests located in sub-projects to behave as though their path was the one of the root project, such as e.g.:
I updated the title of the issue to reflect the current state of findings. |
This is correct. |
I have the same problem expliciting the plugin in FakeApplication. In play 2.1.3 this work. |
We have many sub-projects in our setup and this problem prevents us from migrating to 2.2. Any ideas when it would be resolved? |
I'm wondering if this is an issue with sbt 0.13. |
Not sure if this is related. I have a 'normal' play project without submodules. Since 2.2 my FakeApplication's aren't properly reading additionalConfiguration parameters I pass in. The test runs with the default applicaiton.conf settings and ignores the overrides. |
I can confirm that there is a change in behaviour here. However, the old behaviour was most definitely a bug, and the new behaviour is correct. If project A depends on project B, then it should be able to see resources from project B, not the other way around. So if you have a root project, and a sub module that the root project depends on, the root project should be able to see the classpath, and hence the In the sample project you provided, if you want both the core project and the root project to see the |
There appears to be some kind of regression in regards to plugin discovery during test, in Play 2.2-RC2
The situation I have is the following:
conf/play.plugins
file declaring a few plugins(the dependency is declared via
dependsOn(core % "test->test;compile->compile")
)This was working in 2.1
The text was updated successfully, but these errors were encountered: