Skip to content

[stable/20250402] Cherry-pick "[IncludeTree] IncludeTreeFileList optimizations" #10676

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

Merged
merged 1 commit into from
May 14, 2025

Conversation

AnthonyLatsis
Copy link

(cherry picked from commit 74b92b0)

…mizations"

Optimize IncludeTreeFileList to make creation and iterating to have less
overhead and easier to use:

* Unify the conflict file detection code with the code that uniquing the
  file from nested FileList so there is no need to use separate data
  structures.
* Extend the conflict file content detection to iterating method
  `forEachFile` so it is easier to discover the problem with no
  overhead since no extra data structure is needed.
* Improve the IncludeTreeFileSystem constructor to share more functions
  between two versions.
* Remove an unnecessary requirement that IncludeTree::FileList must
  contain FileEntries. It can have an empty file entries list but
  provides nesting FileList accesses.

(cherry picked from commit 74b92b0)
@bnbarham bnbarham merged commit 2ea28e7 into swiftlang:stable/20250402 May 14, 2025
@AnthonyLatsis AnthonyLatsis deleted the stable/20250402 branch May 14, 2025 16:19
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.

3 participants