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

[SR-10097] Swift shows the same error message for all filesystem errors when loading modules #52499

Open
beccadax opened this issue Mar 13, 2019 · 2 comments
Assignees
Labels
compiler The Swift compiler in itself improvement

Comments

@beccadax
Copy link
Contributor

Previous ID SR-10097
Radar rdar://problem/48833243
Original Reporter @beccadax
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement
Assignee @beccadax
Priority Medium

md5: e5deb138ce3372e72f071161194d96b9

Issue Description:

When SerializedModuleLoaderBase::findModule() finds a module but cannot open it, the method does not diagnose an error; it just goes on to the next path. This results in most platforms getting very generic errors like "unable to load standard library" when we might be able to describe the problem in more detail.

The exception to this is when we find a .swiftmodule directory which contains .swiftmodule files for other targets, but not the target we're currently compiling for. In that single case, we diagnose a specific error.

It would be nice to report these errors with more detail. For instance, the diagnostic could include notes describing each path we tried and why it was not suitable.

@belkadan
Copy link
Contributor

We definitely have error messages for corrupted files. What cases are you seeing where this happens?

@beccadax
Copy link
Contributor Author

I should rephrase this to clarify that I mean file system errors—"no such file", "directory instead of file", and "insufficient permissions" all map to the same generic error message.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself improvement
Projects
None yet
Development

No branches or pull requests

2 participants