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

Changing Realm Swift's Error type to just be a typealias for RLMError #3835

Closed
wants to merge 1 commit into from

Conversation

austinzheng
Copy link
Contributor

There's no real good reason to have Error in Realm Swift be its own separate enum. Having an == for non-specific ErrorProtocol instances is also kind of problematic.

@tgoyne @jpsim @bdash @JadenGeller

@austinzheng austinzheng force-pushed the az-remove-err branch 2 times, most recently from bbc2e00 to b117b77 Compare July 6, 2016 18:45
@JadenGeller
Copy link
Contributor

+1

Will Jazzy still generate Swift documentation for Error cases?

@austinzheng
Copy link
Contributor Author

Ugh. Good question, let me try regenerating the docs and see what happens.

@austinzheng
Copy link
Contributor Author

I wasn't able to get Jazzy working with Xcode 8, but I do know what happens: we won't get the per-case documentation for Error anymore. We may want to move the summary of the error cases into the main documentation, and then add a link.

@JadenGeller
Copy link
Contributor

Aw, that definitely sucks. It's still probably a good move to consolidate these types though, so still +1 from me.

@JadenGeller
Copy link
Contributor

How difficult would it be to extend Jazzy so that "exported" classes also generate documentation? @jpsim

@austinzheng
Copy link
Contributor Author

I think what I'm going to do is as follows:

  • Pull the descriptions for each error case into the online documentation.
  • In both the objc and swift bindings, add a link in the type's docstrings to the documentation. (I'll leave the current ObjC per-case documentation in place.)

This is sort of like how the PropertyType alias is documented.

Would anyone have any objections to this?

@JadenGeller
Copy link
Contributor

JadenGeller commented Jul 12, 2016

How does this change interact with the NSError bridging changes in Swift 3? Does this change limit what sort of information we can include with errors in the future (since RLMError is a primitive type)?

@jpsim
Copy link
Contributor

jpsim commented Jul 26, 2016

Jazzy doesn't document inherited members, which also includes typealiases. See #190 realm/jazzy#190.

@JadenGeller
Copy link
Contributor

@jpsim Wrong issue number?

@jpsim
Copy link
Contributor

jpsim commented Jul 26, 2016

Right issue number, wrong repo: realm/jazzy#190

@austinzheng
Copy link
Contributor Author

austinzheng commented Aug 15, 2016

Superseded by #3934, which also debated this issue (and decided it wasn't worth the trouble to implement).

@austinzheng austinzheng deleted the az-remove-err branch September 14, 2016 23:08
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants