Skip to content

Conversation

@bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Nov 7, 2025

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
  • My changes were added to the CHANGELOG.md in the proper section.
  • I have added necessary changes to user code to the latest Migration Guide.
  • My changes are in accordance to the esp-rs developer guidelines

Extra:

Pull Request Details 📖

Description

Closes #4381

This implements kind-of doc-hiding support for features documented via document-features.

It's done by pre-processing Cargo.toml, looking for #DOC_IF / #DOC_ENDIF comments.

Testing

Building documentation for various chips locally

@bjoernQ bjoernQ added the skip-changelog No changelog modification needed label Nov 7, 2025
@bjoernQ bjoernQ marked this pull request as ready for review November 7, 2025 10:44
"esp-sync/defmt"
]

#DOC_IF chip("esp32") || chip("esp32s2") || chip("esp32s3")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo this would be better if we used has('psram') based on metadata for the chip we're building documentation for, I think we already use somni to do this elsewhere, can we reuse that code instead of custom handling here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow missed we already depend on esp-metadata ... sure that should work, too

@bjoernQ bjoernQ force-pushed the conditionally-hide-feature-flag-docs branch from 5f6997f to b6ec041 Compare November 7, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog No changelog modification needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hide psram and other features from docs when building for unsupported chips

2 participants