Hi everyone,

I'm Harsha, a Computer Science Engineering student and a contributor to
Apache Maven. I'm planning to apply for GSoC 2027 and wanted to share an
idea early to get community feedback.

The proposal: Configurable input normalization for cross-platform build
cache reuse.

Current situation:

The Maven Build Cache Extension calculates file hashes using raw bytes.
Consequently, the same source files checked out with CRLF line endings on
Windows and LF line endings on Linux can produce different cache keys,
preventing cache reuse.

The current workaround is manual line-ending normalization through Git
attributes.

Proposed solution:

Introduce an opt-in, configurable mechanism to normalize selected text
inputs during checksum calculation.

Implementation approach:

- Normalize CRLF and CR line endings to LF before hashing.
- Preserve original files without modifying the working directory.
- Avoid normalizing binary files and unspecified resources.
- Maintain cache compatibility through appropriate implementation
versioning.
- Add tests covering line endings, encodings and cross-platform cache reuse.

Existing references:

- Maven Build Cache Extension:
https://github.com/apache/maven-build-cache-extension
- Remote Cache documentation:
https://maven.apache.org/extensions/maven-build-cache-extension/remote-cache.html
- Relevant implementation: "MavenProjectInput", "DigestUtils" and
"DigestItem".

I'd appreciate feedback on:

1. Is this a useful and feasible direction for a 12-week GSoC project?
2. Are there existing issues, PRs or discussions covering this
functionality?
3. Would a Maven committer be interested in discussing or potentially
mentoring this idea?

I'm open to refining the scope based on community feedback.

Thank you for your time!

Best regards,

Harsha B
GitHub: https://github.com/harshab054

Reply via email to