Skip to content

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

Description

@rnveach

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions