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

Remove feature convenience #113

Merged
merged 1 commit into from
Feb 5, 2023
Merged

Remove feature convenience #113

merged 1 commit into from
Feb 5, 2023

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Feb 5, 2023

Instead prepends panicking methods with the ⚠️ symbol (if they have a "try" overload).
This should show up first in docs and IDE auto-completion.

Also adds crate-level docs about the design behind our ergonomics and fast prototyping.

Closes #60.

This feature was originally designed as an opt-out from panicking methods, which have a Result/Option-based
overload, such as from_variant (try_from_variant), instance_id (instance_id_or_none), cast (try_cast), etc.

However, it does not really add much in practice besides maintenance overhead. To still warn people to not
accidentally use one of these methods, a warning sign is prepended to the brief doc. This should show up
first in IDEs.

Note that the warning sign is not added to every panicking method, but particularly those which have a "try"
overload. To know which methods panic, check out if it contains a `# Panics` section.
@Bromeon Bromeon added documentation Improvements or additions to documentation quality-of-life No new functionality, but improves ergonomics/internals c: core Core components labels Feb 5, 2023
@Bromeon
Copy link
Member Author

Bromeon commented Feb 5, 2023

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 5, 2023

Build succeeded:

@bors bors bot merged commit 17487d6 into master Feb 5, 2023
@bors bors bot deleted the qol/inconvenience branch February 5, 2023 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: core Core components documentation Improvements or additions to documentation quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generated code depends on functions only available under feature convenience
1 participant