-
Notifications
You must be signed in to change notification settings - Fork 48
WIP: deprecation support #255
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
base: deburr
Are you sure you want to change the base?
Conversation
| lang: Language, | ||
| docs: &'_ [&'_ str], | ||
| // an Option<&str> passed as an empty or exactly-one-element slice... is there a better way? | ||
| deprecated: &'_ [&'static str], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielhenrymantilla I don't love this, any better ideas?
| abort_on_unwind_guard = #ඞ::UnwindGuard(#export_name_str), | ||
| unsafe { | ||
| #layout::into_raw( | ||
| #[allow(deprecated)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could make this allow conditional on the function actually being deprecated, I suppose? It doesn't seem worth the effort, but I could be persuaded.
| mk_out!(indent, ctx.out()); | ||
|
|
||
| if docs.is_empty() { | ||
| if docs.is_empty() && deprecated.is_none() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't exactly right, but I think getting it exactly right requires a bit of a deeper refactor.
WIP for early feedback.
known TODOs assuming I'm on the right track:
#[deprecated]annotation to the generated (rust) shim function? This probably doesn't really accomplish anything, since it covers calling the shim function from rust code, which is already very weird, I think?#[deprecated]attribute on non-fnelements#[deprecated(note = "foo")]attribute syntaxdeprecatedtagged docstringObsoleteAttributeannotations