-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
circular imports with globs #3352
Comments
This will be fixed with the "use mod foo;" change.
|
I might have just struck this one: |
Yes, I've just confirmed that it was a circular import that was messing me up. I was using glob format like so:
I fixed it by changing it to:
As jesse99 states, the |
I've been fixing this by moving stuff around which is kind of painful. Better work around, I think, is to remove the use/imports causing problems and replace them with the qualified name. So instead of
do
Not ideal, but way better than trying to move stuff around to avoid circular imports. |
Not critical for 0.6; removing milestone |
Here is a testcase. It seems to still be broken.
|
I think "well-defined", not "feature-complete"; re-nominating. |
accepted for well-defined milestone |
linking to #6143 for unified tracking of resolve |
Triage bump; still relevant. |
Afaict this is just about globs, which are already feature-gated and slated for neutering (#11870). Nominating for closing. |
Graydon's example does not involved |
(keeping this where it is, 1.0, P-backcompat-lang) |
`pub use` globs will be removed from the language, but non-public globs are still buggy, see: rust-lang/rust#3352
All globs are feature gated. Nominated for no longer backcompat-lang. |
Marking as P-low and taking off the milestone. (There are some questions to be resolved with the (potential re)design of globs, but for now as pcwalton said, it is feature gated.) |
Visiting for triage: Can confirm this is still an issue Rust playpen link: http://is.gd/jvqc02 |
re-nominating, globs are no longer gated |
Traige: this is effectively a feature request for globs, and so I'm moving it to the RFCs repo: rust-lang/rfcs#889 |
Update Rust toolchain from nightly-2024-07-16 to nightly-2024-07-17 without any other source changes. This is an automatically generated pull request. If any of the CI checks fail, manual intervention is required. In such a case, review the changes at https://github.com/rust-lang/rust from rust-lang@24d2ac0 up to rust-lang@032be6f.
Given that a crate is the unit of compilation it seems both silly and annoying to not be able to have modules within a crate use each other.
If, for some reason, this is not fixed then the error message should be. It's currently "failed to resolve imports" which provides essentially no insight into where the problem is. Identifying a circular import given that does not sound like fun at all, especially in a large project where the circular imports could be indirect.
The text was updated successfully, but these errors were encountered: