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
Failed to execute mvn clean verify in the JDK 17 showing invalid use of a restricted identifier 'yield' #13840
Comments
I thought we do this jdk usage in some CI. |
This 90th line warning is causing an issue
|
And blocking this #13086 (comment) we need to rename the yield name to some other name, this will fix the issue |
➜ checkstyle git:(master) java --version
java 17.0.7 2023-04-18 LTS
Java(TM) SE Runtime Environment (build 17.0.7+8-LTS-224)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.7+8-LTS-224, mixed mode, sharing)
➜ checkstyle git:(master) git log -1 --oneline | cat
1e6aa29a3 Issue #13834: Add .vscodefoler in .gitignore
➜ checkstyle git:(master) mvn clean verify
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] ------------------< com.puppycrawl.tools:checkstyle >-------------------
[INFO] Building checkstyle 10.12.5-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
...
[WARNING] /home/nick/IdeaProjects/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/grammar/antlr4/InputAntlr4AstRegressionTrickyYield.java:[8,16] 'yield' may become a restricted identifier in a future release
(to invoke a method called yield, qualify the yield with a receiver or type name)
...
[INFO] Successfully validated JSON from /home/nick/IdeaProjects/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/sariflogger/ExpectedSarifLoggerSingleWarning.sarif against /home/nick/IdeaProjects/checkstyle/target/plexus-resources1043365814tmp
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:08 min
[INFO] Finished at: 2023-10-06T23:51:50-04:00
[INFO] ------------------------------------------------------------------------
➜ checkstyle git:(master) uname -a
Linux fedora 6.4.14-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Sep 2 16:36:06 UTC 2023 x86_64 GNU/Linux
Build is passing for me on Fedora with the same jdk version. @AayushSaini101 are you changing the pom? There is no need to make any changes to the pom in the scope of #13086 |
Reference of this issue: #13086 When I add a new test case of the enhanced switch for validation, IDE automatically shows me to switch JDK 14+. Currently, I am using default pom, After this, it is showing the above error that I have mentioned while running the test. Platform: Mac OS |
You need to add test cases for jdk 11+ to noncompilable directory. |
Can you please highlight how can i add to the suitable directory? or share the location where I need to add |
Each test resources directory has a matching noncompilable directory for inputs that use a higher jdk version than Checkstyle supports. You want to put your new inputs into the |
@AayushSaini101 let's close this issue if you cannot reproduce this in the master branch. |
Okay Closing this issue |
Using the env JDK 17, Cannot able to run the mvn clean verify. Showing below error:
Log:
Java Version Used:
Pom Configuration:
The text was updated successfully, but these errors were encountered: