Open SpacyRicochet opened 1 year ago
Now that I think about it, this is probably caused by the fact that SPM doesn't generate the Bundle.module
getter automatically if you do not include resources.
So, did you fix this?
I have tried adding resources: [.process("Resources")],
in the target where I set the dependency and plugin, but with no luck
Just created an empty project with R.swift and I think this now "just works". I don't get any errors with R.swift 7.5.0.
Let me know if I'm overlooking something.
This issue occurs when integrating Rswift in an SPM package, not in an Xcode project.
When targeting SPM packages, Rswift uses Bundle.module
(generated by SPM)
When targeting Xcode projects, Rswift uses Bundle(for: BundleFinder.self)
(generated by Rswift itself)
It looks like r.swift generates invalid code if you have 0 resources for it to parse. That will currently result in the following
R.swift.generated
file;which causes the following build error;
Adding a single Localizable.strings resource (for example) immediately solves the issue.