Skip to content
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

Check docs.rs metadata in CI #13275

Closed
wants to merge 10 commits into from
Closed

Conversation

BD103
Copy link
Member

@BD103 BD103 commented May 7, 2024

Objective

Solution

  • Create check_docsrs_metadata.sh, which verifies that all public crates have the correct metadata using cargo metadata.
  • Run this script in CI.
  • Make all crates scrape examples, to be consistent with the main bevy crate.
    • This isn't fantastic because most crates don't have their own examples, but I find this preferable over excluding the main bevy crate from checks.

Testing

  • Run ./tools/check_docsrs_metadata.sh locally. It should either pass or give an error message for all invalid crates.
  • The CI check should pass.

Further Questions

  • Should this check be always run, only run when Cargo.toml is modified (think dependencies.yml), or only in the merge queue?

Changelog

  • [package.metadata.docs.rs] for all public crates is now verified in CI.

@BD103 BD103 added C-Feature A new feature, making something new possible A-Build-System Related to build systems or continuous integration X-Contentious There are nontrivial implications that should be thought through D-Straightforward Simple bug fixes and API improvements, docs, test and examples D-Domain-Expert Requires deep knowledge in a given domain labels May 7, 2024
@mockersf
Copy link
Member

mockersf commented May 7, 2024

We re trying to avoid shellscripts to be cross platform. Could you add it to the ci rust script?

@BD103
Copy link
Member Author

BD103 commented May 7, 2024

Example error output (source):

image

@BD103
Copy link
Member Author

BD103 commented May 7, 2024

We re trying to avoid shellscripts to be cross platform. Could you add it to the ci rust script?

Not easily right now. Our current ci structure does not support running generic functions, but instead requires everything to be an xshell::Cmd. @Brezak and I are both working on improving this, but that's a few steps away.

When we do finish it, this will be one of the first things ported. (publish.sh is another potential candidate.)

@BD103 BD103 requested a review from mockersf May 7, 2024 17:20
@BD103 BD103 marked this pull request as ready for review May 7, 2024 17:31
@BD103
Copy link
Member Author

BD103 commented May 7, 2024

Speaking of which: #13279.

Copy link
Member

@janhohenheim janhohenheim left a comment

Choose a reason for hiding this comment

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

Given the current limitations regarding the ci tool, this seems alright to me from a quick glance. Nice documentation :)

tools/check_docsrs_metadata.sh Outdated Show resolved Hide resolved
@janhohenheim janhohenheim added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Jul 17, 2024
@BD103
Copy link
Member Author

BD103 commented Oct 23, 2024

Closing due to inactivity. If someone want to adopt this, feel free!

@BD103 BD103 closed this Oct 23, 2024
@BD103 BD103 deleted the check-docsrs-metadata branch October 23, 2024 15:24
@pablo-lua pablo-lua added S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System Related to build systems or continuous integration C-Feature A new feature, making something new possible D-Domain-Expert Requires deep knowledge in a given domain D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! X-Contentious There are nontrivial implications that should be thought through
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants