-
Notifications
You must be signed in to change notification settings - Fork 898
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
Enhance configuration documentation for version/channel #4178
Comments
One way to do this would be to backfill an added-on-version attribute to each config option, similar to rustc's @calebcartwright what do you think? It would also be nice if we could get rustdoc/docs.rs to do a lot of this work, but I don't think that's possible without exposing other library information. |
Thanks for digging into it @ayazhafiz! I haven't really had a chance to think through implementation, but I see two use cases for users that want info about rustfmt config
IMHO the former is the most pressing need, as the absence of this capability has been a source of frustration and confusion for users. I think one simple approach that would help in the short term while we consider more strategic options would be to point users (either via instructions or links) to leverage the GH tags to view the corresponding Configurations.md version. For example:
We could plug those in as links in the main Configurations file in source so folks could see them going forward within the repo and on GH pages. I'm open to anything that helps users get a clearer picture of the available rustfmt configuration options, but we should also be mindful about the overhead both for contributors and maintainers with whatever solution we end up implementing. |
I like this idea. Looks like the github page takes a tagged version of the config file to render Line 69 in e254753
so adding a dropdown (or similar) to change the version should be straightforward. Also looks like gh page has a toggle for stable/all features, but it doesn't seem to work correctly (at least on my firefox) |
See https://gushiermainecoon.htmlpasta.com/ for a demo of this change. Part of rust-lang#4178
See https://gushiermainecoon.htmlpasta.com/ for a demo of this change. Part of #4178
I really like the solution we've implemented, and it feels like it's covered the major use case that motivated this issue. I've got a couple other smaller feature requests/nice-to-haves, but will open up separate issues for those. |
See https://gushiermainecoon.htmlpasta.com/ for a demo of this change. Part of rust-lang#4178
See https://gushiermainecoon.htmlpasta.com/ for a demo of this change. Part of #4178
See https://gushiermainecoon.htmlpasta.com/ for a demo of this change. Part of rust-lang#4178
See https://gushiermainecoon.htmlpasta.com/ for a demo of this change. Part of rust-lang#4178
See https://gushiermainecoon.htmlpasta.com/ for a demo of this change. Part of #4178
Refs #4128 (comment) and #4128 (comment)
The configuration options for rustfmt are defined within this repo in Configurations.md and are also available on GH pages
However, these configuration option listings are reflective of the latest configuration settings within source control on the master branch. As such this can drift from the options available in released versions of rustfmt which has understandably been a source of confusion for users.
We should enhance the public documentation of rustfmt configuration options to take version and channel/distribution into account so that users will be able to determine the true set of config options available for the version of rustfmt they are using.
The text was updated successfully, but these errors were encountered: