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

Restructure ci modules #13101

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Restructure ci modules #13101

merged 3 commits into from
Apr 25, 2024

Conversation

BD103
Copy link
Member

@BD103 BD103 commented Apr 25, 2024

Objective

  • Currently all ci commands are in the subcommands module. This is problematic when you want to implement actually subcommands (such as cargo r -p ci -- doc check).
  • All command modules include the _command suffix, which is redundant.

Solution

  • Move commands modules into root crate folder.
  • Merge contents of commands/mod.rs into main.rs.
  • Move commands::subcommands module into commands module.
  • Remove the _command suffix from all commands::subcommands modules.

- Subcommands are now commands
- Contents of `commands/mod.rs` are now in `main.rs`
@BD103 BD103 added A-Build-System Related to build systems or continuous integration C-Code-Quality A section of code that is hard to understand or change labels Apr 25, 2024
@BD103 BD103 marked this pull request as ready for review April 25, 2024 17:18
@BD103 BD103 requested a review from MrGVSV April 25, 2024 17:18
@BD103
Copy link
Member Author

BD103 commented Apr 25, 2024

Requesting a review from @MrGVSV, since they were the one who structured the ci tool in its current form and may provide insight / reasoning.

Copy link
Member

@MrGVSV MrGVSV left a comment

Choose a reason for hiding this comment

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

LGTM! No particular reason I initially grouped it like that other than the fact that argh refers to them as "subcommands". I think what you have here is much cleaner though!

@BD103
Copy link
Member Author

BD103 commented Apr 25, 2024

LGTM! No particular reason I initially grouped it like that other than the fact that argh refers to them as "subcommands". I think what you have here is much cleaner though!

Interesting! Maybe argh treats the main binary as a "command" and the arguments as "subcommands"? Either way, thanks for the insight :)

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Apr 25, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 25, 2024
Merged via the queue into bevyengine:main with commit 9c17fc2 Apr 25, 2024
28 checks passed
@BD103 BD103 deleted the restructure-ci branch April 25, 2024 20:36
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-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants