-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Metal files silently compiled #5822
Comments
Resources of known types are automatically handled, as per the resources proposal. Could you elaborate more on what the issue is? Also it sounds like you're saying the behavior changed between versions, what changed exactly? |
Ah it was my understanding that the only way to compile metal was via resource.process. From the sounds of it seems SPM has always automagically compiled .metal files then? TBH it's kind of unclear from proposal that what the expectations of metal files are. Maybe some clarity on what files are considered known and are handled automatically? Is it possible to opt out of automatic handling? (so we could process metal files ourselves with a plugin?) |
You should be able to use excludes. I'm not 100% sure, but it might also mean the |
BTW, the proposal was intentionally not descriptive about specific file types since we didn't want to (and couldn't) define concrete Xcode behavior in there. The documentation on resources in Xcode is a little bit more clear, but it unfortunately also doesn't really have an exhaustive list of file types which are handled automatically. |
Yeah fair enough. Maybe then make .process() fail if it tries to process file that should be automatically handled? Can probably close out this ticket but yeah it is a bit confusing. |
Description
SwiftPM 5.3 added support to process .metal files using the resource functionality.
It seems that somewhere between SwiftPM 5.3 and 5.7 all .metal files in a package are compiled into a default.metallib file
I cannot find any documentation on this behaviour. Is it expected? What swiftpm version was this feature added?
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
No response
Swift & OS version (output of
swift --version && uname -a
)No response
The text was updated successfully, but these errors were encountered: