-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Re-enable corrected error line printing and highlighting #681
Conversation
…the position of the first newline.
I saw you mention this on IRC, but if I put a syntax error in, e.g. lib/str.rs, by writting "bogus" on line 1, the compiler errors with
which is wrong |
Oh, I see that existed before this patch |
I'm closing this for now until I work out the kinks, such as having errors on the first line. I'm not entirely sure what's up. |
This is looking good, but I see one more related problem it would be nice to fix before reenabling this. If i modify lib/str.rs to write "bogus" on line 53, like:
then run make stage1/lib/libstd.so, the error printed ends up dumping out the entirety of str.rs from 'bogus' on (it's hitting the 'if ((line as uint) + 1u >= vec::len(fm.lines))' case in get_line. This behavior is kind of unfriendly, can we make this case, instead of printing the rest of the file, just print up to the next newline? |
The `@_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z` one seems strange to me, but based on my libstdc++ usage probably ok. How about generally getting (slowly) rid of this list by calling `std::string llvm::demangle(const std::string &MangledName)` in `llvm/Demangle/Demangle.h` for every function missing a definition? If it succeeds we can still match the beginning, but using the demangled name it should end up in a shorter comparison list and we should miss less functions. I didn't run into a single fn which I couldn't demangle with llvm-c++filt, so I guess it's valid to still panic then.
make fast-check now works correctly, as does regular check.