Skip to content

Remove direct dependency on bevy_lint from bevy_cli#30

Merged
BD103 merged 6 commits intomainfrom
remove-lint-direct-dependency
Sep 3, 2024
Merged

Remove direct dependency on bevy_lint from bevy_cli#30
BD103 merged 6 commits intomainfrom
remove-lint-direct-dependency

Conversation

@BD103
Copy link
Member

@BD103 BD103 commented Sep 2, 2024

This PR makes bevy_lint optional when installing bevy_cli. This solves a number of issue:

  • Nightly is technically no longer required for the main CLI, though I'm going to address that in a follow-up.
  • If you made a change to the bevy_lint crate, you used to have to run cargo build -p bevy_cli --bin bevy_lint_driver for them to be applied.

In order to do this, I:

  • Made bevy lint a facade command that passes all arguments to a bevy_lint binary, if it can be found.
  • Added the bevy_lint binary to the bevy_lint crate, and moved bevy_lint_driver to bevy_lint.

Now, nothing lint-related will be installed if bevy_lint isn't except for the facade command.

@BD103 BD103 added A-CLI Related to the main CLI and not a more specific subcommand A-Linter Related to the linter and custom lints C-Code-Quality An improvement of readability or quality C-Usability An improvement that makes the API more pleasant labels Sep 2, 2024
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.

Looks good, just some minor suggestions :)

@BD103 BD103 enabled auto-merge (squash) September 3, 2024 12:03
@BD103 BD103 merged commit 6c7ae2f into main Sep 3, 2024
@BD103 BD103 deleted the remove-lint-direct-dependency branch September 3, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Related to the main CLI and not a more specific subcommand A-Linter Related to the linter and custom lints C-Code-Quality An improvement of readability or quality C-Usability An improvement that makes the API more pleasant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants