-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
error: unresolved import #2915
Comments
The commit that worked for me with rparse is 1eae497 |
Seems 0.3 was never merged into master so I was not using 0.3. Will try again soon with the commit labeled "release-0.3" on incoming. |
Tried compiling rparse with 2f32a15 which I think is 0.3 and got the same unresolved import disaster. |
I just want to add that I'm experiencing the same errors (for another really small project) since installing rust 0.3 with homebrew. EDIT: Sorry, it was an error on my part. Apparently, the structure of modules/crates changed, so that I must not write e.g. |
With Rust HEAD, I see the first three unresolved imports, but not the others. I'm able to make resolve succeed by changing When in doubt, when resolve doesn't work, change glob imports to specific imports. That said, either this should work with the glob-import as is, or the error message should be better, so I'm deferring to @pcwalton . |
Thanks catamorphism. I was able to get past this issue using your tactic, but am still dealing with a blizzard of unrelated errors. Hopefully I can get a better repro for the resolve error: I think it may be related to circular module imports. Possibly involving what seems to be special handling of the "main" module (the one named after the rc file). |
Spent all day, but I finally have rparse compiling with rust HEAD from master (as of July 22). I can repro the original problem by:
When I do that I get 11+ unresolved import errors:
Seem to be a number of problems here:
|
It's not just circular module references that land you here: it can also happen with crates with multiple files that use the wildcard imports. And it can be rather painful to fix this. You need to guess where the problem is and start, more or less blindly, replacing wildcard imports with potentially big long curly brace lists. Not fun. |
This ticket should probably be closed since there isn't a good repro and rparse is building now. However it would be good to have a ticket for better resolve error messages. |
I've been able to build rparse in a sane way now. There are also a few tickets open for improved resolve error messages (e.g. #3004) so I'm closing this. |
use as_os_str_bytes Make use of the new operations recently added (tracking issue: rust-lang#111544). At least the "host OsStr to target bytes" direction now works even for non-utf-8 strings on all hosts!
Rename the file to use '-' instead of `_` and add the new page to the index. Fixed version can be seen here: https://celinval.github.io/kani-dev/stable-mir.html
I know that there are a multitude of resolve tickets, but after grabbing commit 57e160b (which I think is 0.3) I am completely unable to build https://github.com/jesse99/rparse
I get the following:
I haven't made any progress whatsoever with these errors. Not sure what's going on. Maybe there is a problem with my code somewhere, but "unresolved import" is certainly not helping me find anything. Note that the code did build a week or two ago (when brson went through all the cargo packages and fixed them up).
I also tried head as of evening Friday, Jul 13 PST with the same results.
The text was updated successfully, but these errors were encountered: