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

NSClassFromString not working on release builds #19

Open
rfdickerson opened this issue Dec 9, 2016 · 3 comments
Open

NSClassFromString not working on release builds #19

rfdickerson opened this issue Dec 9, 2016 · 3 comments

Comments

@rfdickerson
Copy link

rfdickerson commented Dec 9, 2016

We discovered that there might be some defects with the reflection features in Swift. Is there another way around doing this?

if let modelClass = NSClassFromString(modelClassName) as? Model.Type {

@tfrank64 filed an issue: https://bugs.swift.org/browse/SR-3333

@tunniclm
Copy link
Collaborator

tunniclm commented Dec 9, 2016

This problem should become moot when we move to resolving these classes at compile time via code generation.

@rfdickerson
Copy link
Author

Ok, good. So we are moving to a more scaffolding based approach than exploiting Swift's dodgy reflection capabilities, now?

@tunniclm
Copy link
Collaborator

We have fixed this in the wip_static_codegen branch of the generator-swiftserver repository, but it isn't merge into master yet.

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

2 participants