apollographql / rover

The CLI for Apollo GraphOS
https://rover.apollo.dev
Other
409 stars 85 forks source link

bug: crashed while starting the language server on NixOS #2234

Open alf opened 1 month ago

alf commented 1 month ago

Tried to run rover lsp as an lsp in Emacs on NixOS on a schema file that is part of a larger set of schema files that are stitched together. In other words, I suspect I'm being a bit of a difficult user here. I'm happy to assist with further information to help make this work though. :)

Description

Describe the issue that you're seeing.

Crash Report

name = "rover"
operating_system = "unix:NixOS"
crate_version = "0.27.0-preview.0"
explanation = """
Panic occurred in file '/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/apollo-language-server-0.3.0/src/diagnostics/mod.rs' at line 20
"""
cause = "called `Option::unwrap()` on a `None` value"
method = "Panic"
backtrace = """

   0: 0x5609bbe5148c - core::panicking::panic::hec978767ec2d35ff
   1: 0x5609bbe51369 - core::option::unwrap_failed::hba6b08832f9ce30b
   2: 0x5609bc47a9c6 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hec297388bf4d330d
   3: 0x5609bc4487af - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::h8dfa0bdfc31b30bc
   4: 0x5609bc5045ed - apollo_language_server::diagnostics::map_diagnostics_for_lsp::hcf8b7238e76885bc
   5: 0x5609bc48b115 - apollo_language_server::graph::Graph::diagnostics_for_uri::ha436df02093926c7
   6: 0x5609bc427653 - <apollo_language_server::server::ApolloLanguageServer as tower_lsp::LanguageServer>::did_open::{{closure}}::h3fc94269d4f9ded5
   7: 0x5609bc5c8e54 - tower_lsp::jsonrpc::router::Router<S,E>::method::{{closure}}::{{closure}}::{{closure}}::hab70d510e97dab87
   8: 0x5609bc5d09f8 - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::h1e7ca2e0f718b491
   9: 0x5609bc5035e9 - <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll::h531b79ba9f4c7f89
  10: 0x5609bc4a1e01 - <core::pin::Pin<P> as core::future::future::Future>::poll::hfa3c4afa94be6040
  11: 0x5609bc4a1e01 - <core::pin::Pin<P> as core::future::future::Future>::poll::hfa3c4afa94be6040
  12: 0x5609bc15630e - <tower_lsp::service::LspService<S> as tower_service::Service<tower_lsp::jsonrpc::request::Request>>::call::{{closure}}::h160eb30bfdf93464
  13: 0x5609bc1e30f4 - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::hcf38786b1803d3bc
  14: 0x5609bc1bdf4e - <futures_util::stream::futures_unordered::FuturesUnordered<Fut> as futures_core::stream::Stream>::poll_next::h0247303da947ff4b
  15: 0x5609bc11ef0b - <futures_util::stream::stream::buffer_unordered::BufferUnordered<St> as futures_core::stream::Stream>::poll_next::h7b88a7dc478ee547
  16: 0x5609bc29fbc0 - <futures_util::stream::stream::filter_map::FilterMap<St,Fut,F> as futures_core::stream::Stream>::poll_next::h1953da4bfc7399e2
  17: 0x5609bc155805 - <futures_util::stream::stream::forward::Forward<St,Si,Item> as core::future::future::Future>::poll::h99276c687e5aa174
  18: 0x5609bc14f30e - <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll::h3f64f3a0eb919920
  19: 0x5609bbf3ce19 - rover::cli::Rover::execute_command::{{closure}}::hfa661cb5ad831f62
  20: 0x5609bbfa03fa - tokio::runtime::park::CachedParkThread::block_on::ha5389a9928fe014c
  21: 0x5609bc14bcaa - tokio::runtime::context::runtime::enter_runtime::h5114e2f211e47071
  22: 0x5609bc2599c7 - tokio::runtime::runtime::Runtime::block_on::hd74a9c571f0c6049
  23: 0x5609bc17dd97 - rover::main::h3db20289af056f7a
  24: 0x5609bc280cb3 - std::sys::backtrace::__rust_begin_short_backtrace::h9a8be1d4f196d3fb
  25: 0x5609bc27e8bd - std::rt::lang_start::{{closure}}::h3420ff7734516d2c
  26: 0x5609bce207a0 - std::rt::lang_start_internal::h5e7c81cecd7f0954
  27: 0x5609bc17dee5 - main
  28: 0x7f2f086a710e - __libc_start_call_main
  29: 0x7f2f086a71c9 - __libc_start_main@GLIBC_2.2.5
  30: 0x5609bbe51cd0 - <unresolved>
  31:        0x0 - <unresolved>"""