Skip to content

[IncludeTreeFileSystem] Make dir_begin() work as expected in OverlayFileSystem #8675

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

Conversation

cachemeifyoucan
Copy link

Make dir_begin() in IncludeTreeFileSystem to return no_such_file_or_directory instead of operation_not_permitted. This allows OverlayFileSystem to correctly ignore IncludeTreeFileSystem layer and continue to search the layer below.

rdar://127370903

@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test macOS platform

@akyrtzi
Copy link

akyrtzi commented May 2, 2024

Could you clarify a bit, what is the "swift overlay yaml file" and how is it setup, it's not reading the file system right?

Also were you really intending to merge on stable/20230725? I thought this is not useful anymore.

Copy link

@benlangmuir benlangmuir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a unit test for this.

@benlangmuir
Copy link

Also were you really intending to merge on stable/20230725? I thought this is not useful anymore.

@akyrtzi this is still the branch that swift main builds with.

@akyrtzi
Copy link

akyrtzi commented May 2, 2024

@akyrtzi this is still the branch that swift main builds with.

Ok, thanks for letting me know! But I'd expect a PR on next and then cherry-pick to stable/20230725.

@cachemeifyoucan
Copy link
Author

Could you clarify a bit, what is the "swift overlay yaml file" and how is it setup, it's not reading the file system right?

This is not about the vfs overlay from yaml file. It is creating a OverlayFileSystem using two different file systems. For example, if you overlay include tree file system on top of real file system, dir_begin is going to error out on include tree layout and you can't iterate file system underneath that is not part of the include tree.

I think we should add a unit test for this.

Unit test is a bit tricky as the only way to create it is from clang dependency scanner. Let me see if I can do something about it.

…ileSystem

Make `dir_begin()` in IncludeTreeFileSystem to return
no_such_file_or_directory instead of operation_not_permitted. This
allows OverlayFileSystem to correctly ignore IncludeTreeFileSystem layer
and continue to search the layer below.

rdar://127370903
@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test windows platform

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