Skip to content
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

Provide some indication to the user that the Java version has been or will be downgraded #250

Open
wilkinsona opened this issue Sep 6, 2019 · 5 comments

Comments

@wilkinsona
Copy link
Contributor

wilkinsona commented Sep 6, 2019

There are a few scenarios when the Java version is silently downgraded. For example, when Kotlin is selected as the language, Java 8 will always be used. Another example in the future will be when Java 13 is offered. Gradle won't support Java 13 until 6.0 so a downgrade may be necessary in the interim.

The silent downgrade has caused some confusion in the past and continues to do so. See spring-io/initializr#739, for example. We should consider making the downgrade clearer to the user. One solution was originally being tracked in spring-io/initializr#773 until it was repurposed.

There are two mains approaches that have been thought of thus far:

  1. Update the UI to prevent combinations that would result in a downgrade
  2. Add a note in the HELP.md file that explains what has happened and why

We may even need a hybrid of the two as the first solution won't help for projects generated using a client other than the web UI.

@snicoll
Copy link
Contributor

snicoll commented Sep 18, 2019

Blocked on spring-io/initializr#1005 (and having spring-io/initializr#1006 would be useful).

snicoll added a commit that referenced this issue Dec 27, 2019
This commit adds a warning when it detects that the JVM version was
downgraded. While not providing the exact reason, it provides a link to
the supported Java versions.

See gh-250
@snicoll
Copy link
Contributor

snicoll commented Dec 27, 2019

@wilkinsona I've added a basic note but I can't say for sure what the reason was for the downgrade at the moment as the two things are completely separate. This makes me question if we shouldn't structure things a little bit differently. If the thing that does the action could also add a note, we would have full context when adding it. There might be other side effects though.

@wilkinsona
Copy link
Contributor Author

Thanks.

If the thing that does the action could also add a note, we would have full context when adding it.

I like the sound of that.

@snicoll
Copy link
Contributor

snicoll commented Jan 20, 2020

We discussed this some more. The problem with making that step more smart is that it would require ProjectDescriptionCustomizer to know about HelpDocument. Not only this is a totally separate concept (and should probably remain that way) but customizers are invoked before the ProjectGenerationContext is refreshed.

What we need is a signal that a property of the description was changed and why it was changed. If we had such (independent) information, A HelpDocumentCustomizer could then inject that and generate the appropriate warnings. This would certainly revisit the current diff arrangement we have at the moment.

@KotlinIsland
Copy link

Update the UI to prevent combinations that would result in a downgrade

This sounds like the best option. Having completely incompatible options available doesn't make much sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants