Skip to content

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

Open
cdietrich wants to merge 1 commit into
masterfrom
cd_xtext-core_issue1835
Open

[eclipse/xtext-core#1835] better treatment of unsupported Java versions in Xtext#198
cdietrich wants to merge 1 commit into
masterfrom
cd_xtext-core_issue1835

Conversation

@cdietrich
Copy link
Copy Markdown
Member

[eclipse-archived/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
attachToEmfObject(resourceSet)
language2GeneratorConfig.putAll(
gradleRequest.generatorConfigsByLanguage.mapValues [ gradleConfig |
val javaVersion = JavaVersion.fromQualifier(gradleConfig.javaSourceLevel.toString)
Copy link
Copy Markdown
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
Copy Markdown
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
…va versions in Xtext

Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
@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
Copy Markdown
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