-
Notifications
You must be signed in to change notification settings - Fork 911
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
Projects that use a single Spring Cloud Zookeeper starter do not compile as the starter does not meet the requirement of depending on spring-boot-starter #191
Comments
Attaching the generated project as it may help diagnose the issue. I'm think the problem seems to be that, althoug the types that cannot be resolved are actually on the classpath, they are only test-scoped and so do not resolve from the main class. |
Thanks, Kris. This is a bug in Spring Cloud Zookeeper as its starters do not meet this requirement:
I've opened spring-cloud/spring-cloud-zookeeper#230. We can use this issue to either disable the broken starters or see if we can work around the problem by leaving |
cloud-starter-zookeeper-config
and session
produces broken project
These other cross-selections with 'session' also look broken:
|
I think we can take Session out of the picture as you can use the dependencies without involving Session and still have the same problem.
This is an error in our metadata as we haven't marked
This is caused by |
I'm sure you are right, I am just reporting what I found and these 'problems' come out of some testing I was doing specifically trying out all combinations of 'session' + X. And those were simply the cases where my test is failing because the resulting project doesn't compile. Whether or not this problem comes from session, from X, or from the combination of X + session... from my point of view, it could be either. All I know is that I observed a problem when both X and session are present. If it is true this is not a 'cross selection' specific problem but something attributable to just one starter / dependency, then II am surprised you don't have tests that catch these problems. I can understand that trying all possible combinations in a test is infeasible (I was trying something like that actually in STS, but the number of combinations is just too great). Just testing each starter in isolation (and check whether it produces a project that builds without errors) seems like it would be not that hard, and would have caught these problems. |
I opened #194 yesterday to look at adding some tests. While writing the tests is not that hard (we already have some that verify that the project builds successfully for all the combinations of Boot version, packaging, and build system that we support), not making the build take too long is hard. We'll have to see what we can do without slowing things down too much such that it then takes too long to get changes into production. |
Yeah, I understand, that problem is only too familiar :-). You'll have to decide if catching those kinds of bugs in the future is worth the extra build times or not, which is not an obvious yes or no question. |
To reproduce you can use STS (or use initializer with whatever IDE or CLI tools that you prefer) and create a new project using the "New Spring Starter" wizard.
Select these two dependencies:
When the project is created it seems to have problems with its classpath. Types such as
SpringBootApplication
andSpringApplication
cannot be resolved in the main application class's source code.I get the same error when running mvn package on the commandline so I assume this is an actual problem with the generated project rather than a bug in STS or Eclipse.
Problem is reproducible for me on both
start.spring.io
as well asstart-development.spring.io
.The text was updated successfully, but these errors were encountered: