-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Stabilize doc_cfg, auto_doc_cfg and cfg_hide features #100883
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
b8acf1f
to
fdbf126
Compare
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
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.
r=me unless you're waiting for more people
@@ -276,3 +276,46 @@ To get around this limitation, we just add `#[doc(alias = "lib_name_do_something | |||
on the `do_something` method and then it's all good! | |||
Users can now look for `lib_name_do_something` in our crate directly and find | |||
`Obj::do_something`. | |||
|
|||
## `cfg` |
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.
kinda wish our docs here were better
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.
I already rewrote the original a bit. Which parts are you thinking about?
I don't recall if there was an FCP previously?
|
library/core/src/lib.rs
Outdated
@@ -173,7 +173,7 @@ | |||
#![feature(const_refs_to_cell)] | |||
#![feature(decl_macro)] | |||
#![feature(deprecated_suggestion)] | |||
#![feature(doc_cfg)] | |||
#![cfg_attr(bootstrap, doc_cfg)] |
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 is what is creating the big mess. I'm finding out by what it was replaced (because we can't remove it altogether otherwise the first compilation stage will fail).
There wasn't.
It's an interesting point. Do you have an idea why someone wouldn't want EDIT: I'd also like to precise that if |
Some crates may not be setup to show this information yet, they may be full of internal EDIT: e.g. I just tried enabling
I would prefer not to stabilize |
Please say what the previous blockers were and how they have been fixed. |
This is the procedure for stabilizing a feature: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html In particular, it would be very helpful to have a stabilization report: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#write-a-stabilization-report |
fdbf126
to
01dae30
Compare
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
All valid points. Before starting the FCP, we need to discuss about whether or not we want |
01dae30
to
70eca2d
Compare
Also I think we will have a problem with stdarch since they use the feature but I can't update it from this repository directly (as seen with the last CI error). |
dc640e3
to
94c0675
Compare
The blocker was that So I see a few possibilities from here:
Overall, my personal preference is So now: did I forget a case? If not, what is your preference? |
This comment has been minimized.
This comment has been minimized.
This feature still has some significant bugs: #43781 (comment) |
UI bugs except for #83428. I think it'd be nice to fix them all before stabilizing though. There is a suggested feature with #73922 by adding this information into the search result too. But I'm not sure if it's really relevant to add it there. Well, the issue is open if you want to debate. Overall, they don't impact the feature itself but the UI (except for #83428 once again). |
Sounds good to me. I'll open a PR adding these two attributes there and make a warning. Next release cycle, we can go forward on this. I'll leave the FCP open in the meantime. |
I think in that case we should cancel the FCP and do it afresh when we have better information. |
It sounds like the lack of consensus is around My understanding is that the |
I mentioned earlier:
From what I have seen with both features available usage of |
As one data point, I have no plans to use If there is a set of developers who would prefer to avoid code churn, then they have the option of not using |
@rfcbot cancel |
@GuillaumeGomez proposal cancelled. |
For what it's worth, while I previously used (also, thank you to those that made the improvements) |
Glad to hear it! As for an example, the |
So what should we do about this and about #102599 ? I think stabling |
Maybe land the attributes and wait one release cycle to make sure there's no concerns? Then it can all be stabilized together. |
It's already the plan. The attributes are in #102599. I was mostly asking if it looked like what they expected and if they thought if it was ready to be merged. ;) |
In my opinion, yes. |
We need someone from the @rust-lang/rustdoc team to agree with us then. |
Okay, at this point I'm very confused as to what "the plan" is and I think other team members are too. I wouldn't know what I'm agreeing to without trawling through multiple PRs and threads. @GuillaumeGomez you posted a stabilization report earlier but I think we need a more extensive one, covering:
Here's an example stabilization report that I wrote once for a different RFC The goal is that team members, but also other people, should be able to make an informed decision without having to read a ton of things to figure out what's going on or be unconfident in their impression of the plan. |
Sure, let me explain the situation a bit more then. The stabilization report written here is still valid, only the way we're moving forward changed. Once #102599 merged, I planned to write another one before re-opening the FCP. However you're right, more context will make everyone's life easier: In this PR, we want to merge the The conclusions were as follow: until the 2024 edition, Now the problem was that we needed to let users be aware that using |
Can you please illustrate, in detail, what each of these features does? I think that's a major part of the confusion here, we all have a general idea of them but not a precise idea of what separates them and their status quo. And again, ideally this is all one single doc so people do not need to trawl through multiple discussions to review it. It might take a while to write, that's fine. Stabilization reports typically take a bunch of work to make. (Just make a separate hackmd and post it in zulip and we can ask you to add more detail where necessary, and we can post it here once we're happy with it.) |
Thanks for the suggestion! I opened a zulip thread here. |
☔ The latest upstream changes (presumably #102948) made this pull request unmergeable. Please resolve the merge conflicts. |
For anyone else following from afar, this is the best description I've found of the issues. |
There are a lot of conflicts here. I'm going to close the PR for now by the same rationale as #102599 (comment), since this is blocked on an RFC. |
Fixes #43781
For some reason I can't seem to reopen #79263 so opening a new one here.
The blocker was that
cfg(...)
didn't implydoc(cfg(...))
, it was added throughdoc_auto_cfg
. Discussion about it is below.r? @rust-lang/rustdoc