Gradle Checkout, file name too long

When checking out the gradle source code from git (on windows, into D:\Checkouts\gradle), the following error occurs:

error: cannot stat ‘subprojects/plugins/src/integTest/resources/org/gradle/groovy/compile/ApiGroovyCompilerIntegrationTest/canDisablePrimitiveOptimizations/src/test/groovy/canCompileAgainstGroovyClassThatDependsOnExternalClass/src/test/groovy/MyGroovyTestCase.groovy’: Filename too long

Request:

  1. Please shorten the names like canCompileAgainstGroovyClassThatDependsOnExternalClass, ApiGroovyCompilerIntegrationTest and canDisablePrimitiveOptimizations so that it will not cause any problem in any environment during checkout
  2. Please enforce a rule when committing code that the user be mindful that the there is a path length limit on environments like windows (this would be very useful).

Thank you :smile:

Windows hits MAX_PATH limits during Git checkout, so extremely deep test-resource paths in the Gradle repo will trigger “filename too long” errors. The project would need to shorten directory and test names (like those long integration-test paths) or adopt a naming guideline to avoid overly nested structures. Adding a commit rule or CI check for maximum path length would help prevent future issues.

Meanwhile, if you need to work around the issue locally, tools like LongPathTool can help handle or extract long paths that Windows blocks.

Or you just set the core.longpaths Git property to true at least for that repository. :slight_smile: