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

Fix rspfile name length exceeding MAX_FILENAME_SIZE (140) characters #2547

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

timfleck
Copy link

Description

This Pull Request addresses an issue where rspfile names exceeding 144 characters cause build failures due to encrypted filesystem limitations. The proposed solution truncates overly long rspfile names and appends a unique identifier to ensure they remain within the acceptable length.

Changes Made

  • ManifestParser::ParseRule: Introduced a length check for rspfile names and applied truncation when necessary.
  • checkFileName: Checks the lengeth of the filename strings. If necessary it shortens it by cut the first 'n' characters and add a checksum to keep the files unique.
  • simpleHash: Generates a checksum to keep the shortened files unique.

Benefits

  • Prevents build failures caused by excessively long rspfile names.
  • Enhances compatibility with filesystems that impose strict filename length restrictions.
  • Maintains uniqueness of rspfile names to avoid conflicts.

Testing

  • Created test cases with rspfile names exceeding 140 characters to ensure they are correctly truncated.
  • Verified that build processes succeed without rspfile name length issues.

@digit-google
Copy link
Contributor

Please open an issue describing your problem so we can discuss the real issue. For example, I fail to see why this would be needed for rspfiles only for example.

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

Successfully merging this pull request may close these issues.

2 participants