protocol VertexBuffer: Identifiable {
var id: UInt32 { get }
}
enum GL {
struct VertexBuffer: VertexBuffer { // error because it's a struct inheriting itself?
}
}
Can I fix this name conflict without giving it a terrible name like VertexBufferProtocol, or naming my buffer obj-c style, GLVertexBuffer?
For whatever reason I can't put a protocol in an enum. Maybe there's a good reason for it, but in that case it would be cool to have actual namespaces instead of abusing enums
I'm pretty sure the only thing I can do is move this to a completely separate module
Huh
It does not work if I use the module name. but it works when I write it in lower case letters
Ok. I see where the problem is, Swift package manager is just very confused. My module has a capitalised name, but Swift is treating the final executable name as the module "namespace", so these don't match.
Swift package manager is using the wrong name here.
This is arguably a bug, executables by convention are lower case, but Swift types and modules are not. No matter which one you change, something is going to look wrong.