Open mahfouz72 opened 6 months ago
@mahfouz72 please add the following details to your issue description:
@nrmancuso He added them.
I tried running my own local to confirm there was no issues, but I got the following error:
Cloning into 'repositories\checkstyle'...
error: unable to create file src/it/resources/org/checkstyle/suppressionxpathfilter/unnecessarysemicolonafteroutertypedeclaration/SuppressionXpathRegressionUnnecessarySemicolonAfterOuterTypeDeclaration.java: Filename too long
error: unable to create file src/it/resources/org/checkstyle/suppressionxpathfilter/unnecessarysemicolonafteroutertypedeclaration/SuppressionXpathRegressionUnnecessarySemicolonAfterOuterTypeDeclarationInnerTypes.java: Filename too long
error: unable to create file src/it/resources/org/checkstyle/suppressionxpathfilter/unnecessarysemicolonaftertypememberdeclaration/SuppressionXpathRegressionUnnecessarySemicolonAfterTypeMemberDeclaration.java: Filename too long
error: unable to create file src/it/resources/org/checkstyle/suppressionxpathfilter/unnecessarysemicolonaftertypememberdeclaration/SuppressionXpathRegressionUnnecessarySemicolonAfterTypeMemberDeclarationTokens.java: Filename too long
error: unable to create file src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unnecessarysemicolonafteroutertypedeclaration/InputUnnecessarySemicolonAfterOuterTypeDeclarationRecords.java: Filename too long
error: unable to create file src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unnecessarysemicolonaftertypememberdeclaration/InputUnnecessarySemicolonAfterTypeMemberDeclarationRecords.java: Filename too long
error: unable to create file src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/variabledeclarationusagedistance/InputVariableDeclarationUsageDistanceCheckSwitchExpressions.java: Filename too long
error: unable to create file src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/variabledeclarationusagedistance/InputVariableDeclarationUsageDistanceCheckSwitchExpressions2.java: Filename too long
error: unable to create file src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname/InputAbbreviationAsWordInNameCheckEnhancedInstanceofAllowXmlLength1.java: Filename too long
error: unable to create file src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/whitespace/nowhitespacebeforecasedefaultcolon/InputNoWhitespaceBeforeCaseDefaultColonEnumAndStrings.java: Filename too long
error: unable to create file src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/unnecessarysemicolonaftertypememberdeclaration/InputUnnecessarySemicolonAfterTypeMemberDeclarationNullAst.java: Filename too long
.....
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
This shows I can't do this in a nested directory (M:\checkstyleWorkspaceEclipse\contribution\checkstyle-tester
) of 61 characters.
@mahfouz72 Do you get the same error when you run the following command in PS in the checkstyle-tester
repo?
git clone https://github.com/checkstyle/checkstyle.git repositories\checkstyle
@mahfouz72 Be aware of the other issue I created.
Also I recommend you use shortFilePaths
since you are on windows.
https://github.com/checkstyle/contribution/tree/master/checkstyle-tester#command-line-arguments
Do you get the same error when you run the following command in PS in the
checkstyle-tester
repo?git clone https://github.com/checkstyle/checkstyle.git repositories\checkstyle
@rnveach weird but no cloning checkstyle is successful now
PS D:\contribution\checkstyle-tester> git clone https://github.com/checkstyle/checkstyle.git repositories\checkstyle
Cloning into 'repositories\checkstyle'...
remote: Enumerating objects: 240424, done.
remote: Counting objects: 100% (25696/25696), done.
remote: Compressing objects: 100% (1185/1185), done.
Receiving objects: 100% (240424/240424), 92.27 MiB | 1.98 MiB/s, done.eused 214728
Resolving deltas: 100% (140280/140280), done.
Updating files: 100% (6632/6632), done.
I have no idea what is going on the old error is gone but I encountered a new error in the middle of running the script ( I haven't done anything just tried one more time)
[INFO] 15 reports detected for maven-project-info-reports-plugin:2.7: index, plugin-management, distribution-management, dependency-info, scm, mailing-list, issue-tracking, cim, plugins, license, modules, dependency-management, project-team, summary, dependencies
[INFO] configuring report plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1
[INFO] 1 report detected for maven-checkstyle-plugin:3.1.1: checkstyle
[INFO] Rendering site with default locale English (en)
[WARNING] No project URL defined - decoration links will not be relativized!
[INFO] Rendering content with org.apache.maven.skins:maven-default-skin:jar:1.3 skin.
[INFO] Generating "About" report --- maven-project-info-reports-plugin:2.7:index
[INFO] Generating "Plugin Management" report --- maven-project-info-reports-plugin:2.7:plugin-management
[INFO] Generating "Distribution Management" report --- maven-project-info-reports-plugin:2.7:distribution-management
[INFO] Generating "Dependency Information" report --- maven-project-info-reports-plugin:2.7:dependency-info
[INFO] Generating "Source Repository" report --- maven-project-info-reports-plugin:2.7:scm
[INFO] Generating "Mailing Lists" report --- maven-project-info-reports-plugin:2.7:mailing-list
[INFO] Generating "Issue Tracking" report --- maven-project-info-reports-plugin:2.7:issue-tracking
[INFO] Generating "Continuous Integration" report --- maven-project-info-reports-plugin:2.7:cim
[INFO] Generating "Project Plugins" report --- maven-project-info-reports-plugin:2.7:plugins
[INFO] Generating "Project License" report --- maven-project-info-reports-plugin:2.7:license
[INFO] Generating "Project Team" report --- maven-project-info-reports-plugin:2.7:project-team
[INFO] Generating "Project Summary" report --- maven-project-info-reports-plugin:2.7:summary
[INFO] Generating "Dependencies" report --- maven-project-info-reports-plugin:2.7:dependencies
[INFO] Generating "Checkstyle" report --- maven-checkstyle-plugin:3.1.1:checkstyle
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000a9a00000, 578813952, 0) failed; error='The paging file is too small for this operation to complete' (DOS error/errno=1455)#
# There is insufficient memory for the Java Runtime Environment to continue.
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at diff.generateCheckstyleReport(diff.groovy:271)
at diff$generateCheckstyleReport$10.callCurrent(Unknown Source)
at diff.launchCheckstyleReport(diff.groovy:232)
at diff$launchCheckstyleReport$6.callCurrent(Unknown Source)
at diff.run(diff.groovy:31)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
I searched for it and I found that the solution would be increasing the heap size used by IDE but I increased it and still got this error. I use IntelliJ
@rnveach I have Ubuntu 22 ( I am on a dual-boot machine). do you recommend using it? or this error is unrelated to the OS
@mahfouz72 few things here:
Though my experience with Windows is very limited, I have a lot of experience with both MacOS and Linux, and I can tell you that Linux provides the best experience for most software development activities.
I would recommend using your Ubuntu install. Note that this will also simplify attempts to recreate executions from CI since nearly all our CI tasks run on Ubuntu images.
I increased it and still got this error.
It would be helpful to know how you increased it, by how much, and how much memory you have available.
It would be helpful to know how you increased it, by how much, and how much memory you have available.
from the IDE settings help -> increase memory size it was 995 I increased it to 1300
I would recommend using your Ubuntu install
okay I will try to set my environment in Ubuntu ASAP to see if these errors are gone
okay I will try to set my environment in Ubuntu ASAP to see if these errors are gone
To be clear, your errors may not be "gone", what I am suggesting above will likely make it easier to debug though.
Also, fwiw, I do not ever generate reports locally anymore, since it ties up my laptop for some time. You are welcome to fork my report generation repo at https://github.com/nrmancuso/checkstyle-diff-report-generator and add some arguments for base branch to the scripts/workflows, it should be pretty simple.
@nrmancuso thank you !. I will try it because I am still strugling for generating report locally even after using ubuntu .this error appears again while cloning elasticsearch project. but can I use your report generation if I want to use a local branch as base branch not the master?
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
@mahfouz72 you won't be able to use anything local, since the reports are generated in CI. I would suggest forking the repo and generating some basic reports to get familiar with the flow.
Are you behind a proxy, vpn, or anything special like those? https://stackoverflow.com/questions/66366582/github-unexpected-disconnect-while-reading-sideband-packet
Are you behind a proxy, vpn, or anything special like those?
no
@nrmancuso @rnveach after following almost all the solutions in stackoverflow. and rerun the script +10 times. I generated a report using 26 project only. the last one (jdk 17)
is showing the same error when cloning even after I applied all possible solutions. this error is so annoying
How did you initially clone checkstyle or repos in general? Just curious if you did something different than using the command line git.
@rnveach in general I just use git clone with command line and never had this problem.
I was trying to manually generate a report this is my command
but I got this error when testing started and we want to clone into checkstyle repo
this is my checks.xml file and this is properties_to_test on
my machine specification : operating system: Windows 11, version 22H2 for x64