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

[Bug]: cyclic deps #927

Closed
1 task done
iGxnon opened this issue Jul 30, 2024 · 4 comments
Closed
1 task done

[Bug]: cyclic deps #927

iGxnon opened this issue Jul 30, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@iGxnon
Copy link
Contributor

iGxnon commented Jul 30, 2024

Description about the bug

From rust-analyzer:

2024-07-30T04:14:30.078235Z ERROR cyclic deps: xline(Idx::<CrateData>(324)) -> xline_test_utils(Idx::<CrateData>(339)), alternative path: xline_test_utils(Idx::<CrateData>(339)) -> xline(Idx::<CrateData>(324))

It seems to have been avoided through [dev-dependencies], but this is not a good solution since rust-analyzer reports it as an error.

Feasible solution:

Extract the IT of Xline (which may include curp and client's IT) as a separate sub crate.

Or

Put xline-test-utils into xline and add #[cfg(test)] to its module:

// For test binary with `--features test` or test target
#[cfg(any(test, feature = "test"))]
#[cfg_attr(feature = "test", allow(unused))]
pub mod test_util;

Version

0.6.1 (Default)

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@iGxnon iGxnon added the bug Something isn't working label Jul 30, 2024
Copy link

👋 Thanks for opening this issue!

Reply with the following command on its own line to get help or engage:

  • /contributing-agreement : to print Contributing Agreements.
  • /assignme : to assign this issue to you.

@LucienY01
Copy link
Collaborator

/assignme

@LucienY01
Copy link
Collaborator

Hi, I found a related issue in rust-analyzer repo #rust-lang/rust-analyzer/issues/14167, where the author indicated that we can safely ignore this error in our situation if everything works fine.

It is not a wrong thing to do that, it's just r-a struggling with it (so yes, you are hitting this here). If everything works fine you can safely ignore the error.

@iGxnon
Copy link
Contributor Author

iGxnon commented Aug 3, 2024

Well, if it works, leave it as is. 🤣

@iGxnon iGxnon closed this as completed Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants