-
Notifications
You must be signed in to change notification settings - Fork 465
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
Added eclipse-wtp 3.15.2 to Eclipse (as pseudo Eclipse version 4.13.1). #537
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the changelog and documentation for this is a bit tricky. In general, I'm in favor of complete documentation, but in some cases I think it's better to have a descriptive error message, if it makes the documentation shorter and easier to read for the 95% usecase. As Spotless has grown more capable, I think our docs are starting to become a little less beginner-friendly.
The rationale behind the approach we took was that every known user is fine with just one config, so I think it's okay to leave it out of the docs, so long as the changelog and error has the required info to help debug any surprises. Here's another way to do the changelog:
- Formerly, the Eclipse-WTP formatter (web tools platform, not java) could encounter errors in parallel multiproject builds. This is now fixed, but there is a new limitation that WTP must have the same configuration for every subproject it is used in. For example you cant use
eclipseWtp('xml').configFile('a')
in one project andeclipseWtp('xml').configFile('b')
in another. You also can't useeclipseWtp('xml')
in one project andeclispeWtp('css')
in another. If this limitation is a problem for your use case, please leave a comment in Remove single-config limitation from Eclipse WTP formatter #538
We do generate an error if it is used incorrectly, correct? Ideally we would put a link to #538 into that error, but I think it's also sufficient to just put the stacktrace into the body of #538 so that it is easy to google.
Proposals are always welcome.
The second part is incorrect. We already use different class loader for "different formatter types".
This is an option. This is the current error. The error was always there for |
Thanks, I forgot we had built some of that, in that case, maybe this as the changelog entry:
Except, unless I misunderstand, I actually don't think we have that limitation! As you pointed out, the spotless/lib-extra/src/main/java/com/diffplug/spotless/extra/EclipseBasedStepBuilder.java Lines 143 to 151 in 11714b6
so now I think we are already capturing the settings, and there is no limitation. Am I missing something again? |
Mh, and I forgot that we really do a new state per config change. I only remembered the But your are right, we currently have no restrictions on WTP. To summarize:
|
For every build tool I'm aware of besides Gradle, the build is a run-once process. Anything that might be useful is cached, since the whole process is just going to exit soon anyway. The gradle daemon is super useful, but because it's long-lived there's a chance that the "cache-everything" approach can cause it memory-leak into oblivion. But I think that's not only okay, but also the right approach for build plugins to take. The build does not change often, and when it does change restarting the daemon is not a relatively-expensive process anyway. For the common case where the build does not change then our current approach is the most-efficient, easiest-to-use way to do it. |
I think this PR is fine as-is, it just doesn't need the doc changes, and can get by with a simpler changelog entry. |
Fix #492.
Introduced pseudo Eclipse version 4.13.1 since the new approach does not support multiple WTP configurations (for the same WTP type). So the user still has the possibility to use 4.13.0.
If any user needs multiple WTP configurations, please raise an issue.