-
Notifications
You must be signed in to change notification settings - Fork 12
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
docs(_dev-doc): introduce the _dev-doc
feature
#306
base: main
Are you sure you want to change the base?
Conversation
This introduces the `_dev-doc` Cargo feature, which allows us to hide some items from users by default and only show them to developers when this feature is enabled.
@@ -89,4 +89,7 @@ silent-panic = ["riot-rs-rt/silent-panic"] | |||
## Allows to have no boards selected, useful to run target-independent tooling. | |||
no-boards = ["riot-rs-boards/no-boards"] | |||
|
|||
# Enables developer docs, shows items that are otherwise hidden from users. |
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 feature is not part of the visible docs on purpose, as it's only aimed at developers.
If I understand correctly, this features is used for functions/ modules that users don't need to care about if they are using our macros. I think I would prefer not to hide the items. Instead I think we should add docs explaining their purpose and when/how they should be used. Edit: also I think the term "developer docs" is confusing. What developers are you referring to? If anything, I understand it more as an "expert mode"; for users who know what they are doing. |
This originates from the use of numerous crates in a workspace, where we need to export some items from our child crates and use them in parent crates (while not being part of our user-facing, public API), mostly due to our heavy use of
All
I'm not sure what you mean by this. docs.rs allows to select the set of features we want (and we would not enable
If we did that, these items would become part of our API and of our (future) SemVer commitment, which we want to avoid for what's only cross-crates implementation details.
Here, "developers" are RIOT-rs developers, users are application developers. |
Thanks for the clarification; I noticed I slightly misunderstood the purpose of this feature.
You're right, I didn't think of that. But if we decide that these items only for internal usage, I would be in favor of just making it
I'd argue that this is a rather niche use-case. Developers could also just look at the rustdocs docs, and then look what additional items there are that are I see the pro's of this features, but I still think it might be more confusing that helpful. But I don't feel strongly about it; curious to hear what other folks think. |
This introduces the
_dev-doc
Cargo feature, which allows us to hide some items from users by default and only show them to developers when this feature is enabled.All items that should be hidden to users may not be part of this PR, you can propose them here or we'll progressively add them; this PR mostly aims to lay the groundwork for easily adding them in the future.
We will soon build another version of the docs, aimed at users, with the
_dev-doc
feature disabled.