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

[eclipse/xtext-core#1835] better treatment of unsupported Java versions in Xtext #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cdietrich
Copy link
Member

[eclipse/xtext-core#1835] better treatment of unsupported Java versions in Xtext

@cdietrich cdietrich requested a review from oehme February 19, 2022 07:34
@cdietrich cdietrich force-pushed the cd_xtext-core_issue1835 branch from 5df47a7 to fb5e1db Compare February 19, 2022 07:35
@@ -230,12 +230,16 @@ class XtextGradleBuilder implements IncrementalXtextBuilder {
attachToEmfObject(resourceSet)
language2GeneratorConfig.putAll(
gradleRequest.generatorConfigsByLanguage.mapValues [ gradleConfig |
val javaVersion = JavaVersion.fromQualifier(gradleConfig.javaSourceLevel.toString)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

am not sure how we should react here.
Java 11 as default is not available as we compile against old version.
maybe we should stop here and report error instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should make this an error.

@cdietrich cdietrich force-pushed the cd_xtext-core_issue1835 branch from fb5e1db to 7f9e7be Compare March 31, 2023 08:09
@cdietrich cdietrich force-pushed the cd_xtext-core_issue1835 branch from 7f9e7be to 450bfee Compare March 31, 2023 08:16
if (javaVersion === null) {
val msg = "Xtext does not support Java " + gradleConfig.javaSourceLevel.toString + "."
gradleRequest.logger.error(msg)
throw new GradleException(msg)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it ok to throw here or should we continue with default and just log error

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

Successfully merging this pull request may close these issues.

2 participants