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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

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-Enhancement A new feature 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.

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-Enhancement A new feature D-Domain-Expert Requires deep knowledge in a given domain D-Straightforward Simple bug fixes and API improvements, docs, test and examples X-Contentious There are nontrivial implications that should be thought through
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants