Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Crashes for Servo with an updated racer #20

Closed
Manishearth opened this issue Jan 21, 2016 · 13 comments
Closed

Crashes for Servo with an updated racer #20

Manishearth opened this issue Jan 21, 2016 · 13 comments

Comments

@Manishearth
Copy link

Opening document.rs in Servo after cargo update -p racer in the racerd directory gives the following error:

$ tail -f /tmp/ycm_temp/racerd_43924_stderr.log
bogofile:2:1: 2:4 error: expected identifier, found keyword `use`
bogofile:2 use devtools_traits::CSSError;
           ^~~
bogofile:2:5: 2:20 error: expected one of `::`, `;`, or `as`, found `devtools_traits`
bogofile:2 use devtools_traits::CSSError;
               ^~~~~~~~~~~~~~~
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:330
stack backtrace:
   1:     0x7fa1dc4a06b0 - sys::backtrace::tracing::imp::write::h3be75c22d68e439dkju
   2:     0x7fa1dc4a2bd5 - panicking::default_handler::_<closure>::closure.42499
   3:     0x7fa1dc4a267f - panicking::default_handler::h778d598585cd05bamwy
   4:     0x7fa1dc48eba6 - sys_common::unwind::begin_unwind_inner::h28dde7e4a93f998fRbt
   5:     0x7fa1dc48f2c8 - sys_common::unwind::begin_unwind_fmt::h8325303cc05dc240Xat
   6:     0x7fa1dc49fcf1 - rust_begin_unwind
   7:     0x7fa1dc4d4c6f - panicking::panic_fmt::h141ead198f715924RZL
   8:     0x7fa1dc4d4f48 - panicking::panic::h941dcac71cd8feafoYL
   9:     0x7fa1dc2a232b - cargo::get_crate_file::hbe7a9e5d19d77337wii
  10:     0x7fa1dc2a023d - nameres::get_crate_file::h870708696b97ac12yte
  11:     0x7fa1dc2af1b7 - matchers::match_extern_crate::h40b5d9f32938d273fzg
  12:     0x7fa1dc2a4025 - matchers::match_types::hffaa35b0498a2c653gg
  13:     0x7fa1dc2a2c0b - nameres::run_matchers_on_blob::hf1fa50871a312f0bPIe
  14:     0x7fa1dc29f45e - nameres::search_scope::h270165dad7c45ebd2ye
  15:     0x7fa1dc2a9f98 - nameres::search_local_scopes::hbd10ef5dd517740e9Ke
  16:     0x7fa1dc29c717 - nameres::resolve_name::h2dcd4d1cd2449db0P2e
  17:     0x7fa1dc29b01b - nameres::search_crate_root::hf50fc79f54fa6003sne
  18:     0x7fa1dc29ca2d - nameres::resolve_name::h2dcd4d1cd2449db0P2e
  19:     0x7fa1dc2586c5 - nameres::resolve_path::h08a17d152c0b0b63Gcf
  20:     0x7fa1dc258b37 - nameres::resolve_path::h08a17d152c0b0b63Gcf
  21:     0x7fa1dc256820 - core::complete_from_file::h181406f80979f7c7H2a
  22:     0x7fa1dc24e051 - engine::racer::Racer<'a>.SemanticEngine::list_completions::h43462f672eb7040am7a
  23:     0x7fa1dc2485b7 - http::completion::list::hcda39ad919557730qua
  24:     0x7fa1dc21a67b - middleware::F.Handler::handle::h4402679360748095063
  25:     0x7fa1dc43a060 - middleware::Box<Handler>.Handler::handle::h5197bd449689d5d8Qoa
  26:     0x7fa1dc3ec382 - router::Router::handle_method::hbc7eba1de605229diia
  27:     0x7fa1dc3ed91e - router::Router.Handler::handle::h76c19d88b1859211lja
  28:     0x7fa1dc439ca8 - middleware::Chain::continue_from_handler::hc2fd1c16054ef71cFma
  29:     0x7fa1dc437d3a - middleware::Chain.Handler::handle::heda909bfd0e3c073Mia
  30:     0x7fa1dc22e569 - hyper::server::listener::spawn_with::_<closure>::closure.14347
  31:     0x7fa1dc22ced6 - sys_common::unwind::try::try_fn::h14170584884215212308
  32:     0x7fa1dc49fc88 - __rust_try
  33:     0x7fa1dc49c63b - sys_common::unwind::try::inner_try::h2d9318abe36c76cap8s
  34:     0x7fa1dc230e6b - boxed::F.FnBox<A>::call_box::h586351103777805204
  35:     0x7fa1dc4a15f3 - sys::thread::Thread::new::thread_start::haf863f2ba39455ffitx
  36:     0x7fa1db4cd6a9 - start_thread
  37:     0x7fa1dbcf6eec - clone
  38:                0x0 - <unknown>

This is when I type use url:: on line 4
This is in both vim and sublime.

@jwilm
Copy link
Owner

jwilm commented Jan 21, 2016

The bogofile stuff is a red herring. Appears to be a problem with the PR that was just merged. Can investigate in the AM.

@Manishearth
Copy link
Author

okay, thanks!

@jwilm
Copy link
Owner

jwilm commented Jan 21, 2016

Might be related to racer-rust/racer#484

cc @jaxx

@Manishearth
Copy link
Author

Any updates regarding this?

@jwilm
Copy link
Owner

jwilm commented Feb 4, 2016

@Manishearth I think this is fixed in newer versions of racer, but I haven't updated it in racerd, yet. Have you tried that out locally?

@Manishearth
Copy link
Author

Trying

@Manishearth
Copy link
Author

No longer crashes. However, external crates still don't work :/

@Manishearth
Copy link
Author

Additionally, use url::.. used to autocomplete pre-update, it no longer autocompletes (in document.rs, again)

@jwilm
Copy link
Owner

jwilm commented Feb 4, 2016

Were you using plain racer before ycm?

@Manishearth
Copy link
Author

No, I was using ycm. It would complete local paths fine, and would complete url::.., but no other external crate. Now it doesn't complete any external crates.

@jwilm
Copy link
Owner

jwilm commented Feb 4, 2016

I meant to ask about like 3 months ago before ycm supported rust.

@Manishearth
Copy link
Author

Oh, no, I wasn't using plain racer anytime recently. I was using it like a year ago.

@Manishearth
Copy link
Author

Perhaps this is the issue? My servo setup doesn't use the same .cargo folder as the rest of my system. This might be causing problems since the crates that Servo uses aren't there in the global .cargo cache.

However, this doesn't explain the local path deps not working (these are what I mainly care about anyway.

Also, since I'm working on a path dep, there's no nearby Cargo.lock. Do we need to instruct racer on where to find the lockfile?

This could perhaps be solved with a config file? YCMD has a .ycm_extra_conf.py for picking up C++ build flags that it looks for based on your directory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants