-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
codegen/general: Emit "Since vXXX" in #[deprecated] attributes #1087
Conversation
Neither the module nor struct (wrapped inside `glib::wrapper`) had a deprecation warning previously.
It would probably make sense to update the gtk-rs CI to use a docker image with latest GLib and everything else. That we don't build with the latest version seems suboptimal. Can you create an issue for that? For gtk4 this is already done anyway, maybe we can easily base it on that @bilelmoussaoui ? |
Not sure about this one. It's probably good to also have it next to each function? Then it's more obvious and not just when scrolling to the very top of the page. @GuillaumeGomez how is this handled in rustdoc and in other projects using this rustdoc feature? |
Isn't that taken care of by the |
There's already a docker image used for gtk-rs's CI. We can easily adapt it and build more stuff manually |
Can we easily get the whole latest GNOME platform in there? |
Maybe some CI does somewhere, but there's no explicit Will have to see how that works out when |
As seen in #1080 this is filtered out for features already (and propagated, if a module has a feature scope it appears to be shown on all type pages under it), but it's complicated (hence not properly working I presume) for reexports. Perhaps the same could be or will be done for deprecation warnings. It is indeed a good point, when navigating straight to a function inside some type (link to anchor) it is easy to miss the deprecation warning on top. |
Maybe there should, @GuillaumeGomez? :) |
Do you mean like this https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/master/gstreamer/Cargo.toml#L54 ? There is that in gtk-rs too. Which is why I didn't understand what you meant.
There is |
@GuillaumeGomez Exactly, it isn't there on the
That's fine. As long as |
Using the container image published by gnome-build-meta and used at GNOME for CI would be possible I think. I will give it a try. |
That would seem like a low-effort approach for getting the latest stable releases of everything for our CI here. |
No, it's not fine at all. It was a huge setback for us because we had a lot of hopes into it and invested quite some time. Cargo still hasn't been fixed so we cannot make it work for the moment. |
I understand your disappointment but that seems to have little to do with this PR adding extra context to The problem here is that we need to enable the latest feature when compiling the docs, otherwise things like |
In other words, if the latest version feature can be added to the |
What I'm saying is that for the moment, we should rely on the |
But of course, we cannot switch to |
Anyway, can we go back to the discussion whether to add the latest version to the |
For that there is no issue I can see. |
|
This started as an effort to get rid of the
[Deprecated since XXX]
and# Deprecated
in the documentation in favour of cleaner and more obvious:Unfortunately that doesn't show unless the docs are compiled with at least that version - which only seems to be happening in GStreamer thus far.
Also emit the missing
#[deprecated]
notice for objects, right into themod.rs
file. Is it missing anywhere else?TODO: Probably need the same deduplication for these attributes as we had for the features in #1080. Right now it shows multiple times, even though deprecation of a type should also hold for all members and functions. Unlike
doc(cfg())
features (see #1080 for example)rustdoc
does not seem to coalesce these: