Skip to content

Build cache cannot handle outputs with non-BMP characters in the filename #36387

@octylFractal

Description

@octylFractal

Current Behavior

If a file has a non-BMP character in its name, storing the build cache will fail:

> Failed to store cache entry 9ea8bf46385e31b90193de4ce7d435c6 for task ':compileJava': Could not pack tree 'destinationDirectory': Could not get file mode for '<project dir>/build/classes/java/main/Main𓊖.class'.

Expected Behavior

The build cache should function normally.

Context (optional)

Since we now emit Unicode from test names due to the reporting refactoring, it's much easier for non-BMP characters to end up in the output.

Self-contained Reproducer Project

Put the following in Main𓊖.java: public class Main𓊖 {}

Then run gradle compileJava --build-cache --rerun.

Gradle version

9.3.0

Gradle version that used to work

9.2.0

Build scan URL (optional)

No response

Your Environment (optional)

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions