aws / aws-toolkit-jetbrains

AWS Toolkit for JetBrains - a plugin for interacting with AWS from JetBrains IDEs
https://plugins.jetbrains.com/plugin/11349-aws-toolkit
Apache License 2.0
730 stars 198 forks source link

Amazon Q Feature - Use language level from project and module settings #4545

Closed damntrecky closed 3 weeks ago

damntrecky commented 1 month ago

Types of changes

Description

The goal of this PR is to allow project validation to read the project and module level "language level" to help determine what Java version is being used.

IntelliJ references Maven <properties> and sets the appropriate "language level" at the project and module level.

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>8</java.version>
    <maven.compiler.release>8</maven.compiler.release>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

Will set "language level" to 8 in your module.

Impact

This will impact users who cannot transform because their JDK/SDK version is set to JDK 17 or higher. We will allow users who are compiling Java 8/11 projects from JDK 17+.

Previously if users had sdk set to JDK17 they automatically failed clientside validation and the project could not be submitted. We believe this will be a substantial change to help transform projects

Checklist

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

damntrecky commented 1 month ago
Screenshot 2024-06-04 at 3 00 41 PM Screenshot 2024-06-04 at 3 00 45 PM
rli commented 3 weeks ago

i don't think 232 understands that JDK21 exists

e: file:///codebuild/output/src3285644532/src/github.com/aws/aws-toolkit-jetbrains/plugins/amazonq/codetransform/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformProjectUtilsTest.kt:11:48 Unresolved reference: getMockJdk21
e: file:///codebuild/output/src3285644532/src/github.com/aws/aws-toolkit-jetbrains/plugins/amazonq/codetransform/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformProjectUtilsTest.kt:28:19 Unresolved reference: getMockJdk21
sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
8 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
3.0% Duplication on New Code

See analysis details on SonarCloud