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

Fix cyclic dep #11523

Merged
merged 4 commits into from
Jan 25, 2024
Merged

Fix cyclic dep #11523

merged 4 commits into from
Jan 25, 2024

Conversation

Elabajaba
Copy link
Contributor

@Elabajaba Elabajaba commented Jan 25, 2024

Objective

Rust analyzer kept complaining about a cyclic dependency due to bevy_input having a dev-dependency on bevy.

bevy_input was also missing bevy_reflect's "smol_str" feature which it needs to compile on its own.

Fixes #10256

Solution

Remove the dev-dependency on bevy from bevy_input since it was only used to reduce imports for 1 test and 3 doc examples by 1 line each, as bevy_input already has dependencies on everything needed for those tests and doctests to work.

Add bevy_reflect's "smol_str" feature to bevy_input's dependency list as it needs it to actually compile.

@mockersf mockersf added the C-Docs An addition or correction to our documentation label Jan 25, 2024
Copy link
Contributor

@atlv24 atlv24 left a comment

Choose a reason for hiding this comment

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

thank you so much

@torsteingrindvik
Copy link
Contributor

Does this fix #10256 perhaps?

@Elabajaba
Copy link
Contributor Author

Does this fix #10256 perhaps?

It does for me.

@rparrett rparrett 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 Jan 25, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 25, 2024
Merged via the queue into bevyengine:main with commit cd8dccb Jan 25, 2024
28 checks passed
tjamaan pushed a commit to tjamaan/bevy that referenced this pull request Feb 6, 2024
# Objective

Rust analyzer kept complaining about a cyclic dependency due to
`bevy_input` having a dev-dependency on `bevy`.

`bevy_input` was also missing `bevy_reflect`'s "smol_str" feature which
it needs to compile on its own.

Fixes bevyengine#10256

## Solution

Remove the dev-dependency on `bevy` from `bevy_input` since it was only
used to reduce imports for 1 test and 3 doc examples by 1 line each, as
`bevy_input` already has dependencies on everything needed for those
tests and doctests to work.

Add `bevy_reflect`'s "smol_str" feature to `bevy_input`'s dependency
list as it needs it to actually compile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation 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.

Rust analyzer reports cyclic dependencies in Bevy
7 participants