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

Name clash with Observable module #22

Open
marchy opened this issue Dec 3, 2015 · 0 comments
Open

Name clash with Observable module #22

marchy opened this issue Dec 3, 2015 · 0 comments

Comments

@marchy
Copy link

marchy commented Dec 3, 2015

Hi there, I ran into unsurmountable issues getting the framework running where a name clash happens with any class within the module when importing as a framework (ie: Cocoapods). For example, we have an Event class (since our domain models everyday events) and Swift gets tripped up on being able to specify that an event is an Observable.Event as opposed to your own Event.

The reason for this is that both the module is called Observable as well as a framework class exists called Observable. This is apparently an anti-practice in Swift to have the module use the same name as any of its existing classes. Event typealiasing gets tripped up by this (ie: ""typealias ObservableEvent = Observables.Event"")

PROPOSAL: Rename the framework to "Observables" (or something similar). Unfortunately I think this is the only way out of this (without renaming the Observable class itself)

I have made all the changes required on the fork here: #21. Would appreciate you accepting this and renaming the project (Cocoapod will likely require a new pod, GitHub has a rename option at the top of the project Settings page). I know it's not the nicest thing to rename the project but you really want people to be able to integrate your project seamlessly using Cocoapods etc and not just copying the files in, and it'll solve any problems like this going forward. So hopefully someone else doesn't waste a full day chasing this down as I did. :)

Cheers!

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

No branches or pull requests

1 participant