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

diff:groovy: can't clone checkstyle repo in some directories on Windows #840

Open
rnveach opened this issue Feb 29, 2024 · 0 comments
Open

Comments

@rnveach
Copy link
Member

rnveach commented Feb 29, 2024

Identified at #839 (comment) ,

When running diff.groovy with the checkstyle on my local, 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 :/'
....
fatal: destination path 'repositories\checkstyle' already exists and is not an empty directory.
fatal: destination path 'repositories\checkstyle' already exists and is not an empty directory.
fatal: destination path 'repositories\checkstyle' already exists and is not an empty directory.
fatal: destination path 'repositories\checkstyle' already exists and is not an empty directory.
Caught: groovy.lang.GroovyRuntimeException: Error: !

This shows I can't do this in a nested directory (M:\checkstyleWorkspaceEclipse\contribution\checkstyle-tester) of 61 characters.

I tested this and I can't clone checkstyle into a path of 71 characters or more.

\contribution\checkstyle-tester\repositories\checkstyle is 56 characters, which doesn't include the drive (2 characters), leaving me 13 characters to put the contribution directory somewhere if I choose.

We should allow users to override the repository directory. It creates issues and a lag to put it into the path of git even with the gitignore when I was working with this on linux.

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

No branches or pull requests

1 participant