Closed CAD97 closed 5 years ago
I found what I believe to be the source of the error.
https://github.com/rust-lang/gll/blob/master/src/forest.rs#L80
pub fn one_choice(&self, node: ParseNode<'i, P>) -> Result<ParseNode<'i, P>, MoreThanOne> {
match self.grammar.parse_node_shape(node.kind) {
ParseNodeShape::Choice => {
let choices = &self.possible_choices[&node];
thread '<unnamed>' panicked at 'no entry found for key', src\libcore\option.rs:1038:5
at src\libcore/panicking.rs:85
7: core::option::expect_failed
at src\libcore/option.rs:1038
8: <gll::forest::ParseForest<'i, G, I>>::one_choice
9: <gll::high::ExistsL<T>>::unpack_ref
10: coverage::process
11: <rayon::iter::par_bridge::IterParallelProducer<'a, Iter> as rayon::iter::plumbing::UnindexedProducer>::fold_with
12: rayon::iter::plumbing::bridge_unindexed_producer_consumer
13: std::panicking::try::do_call
14: _rust_maybe_catch_panic
at src\libpanic_unwind/lib.rs:87
15: <rayon_core::job::StackJob<L, F, R> as rayon_core::job::Job>::execute
16: rayon_core::registry::WorkerThread::wait_until_cold
17: rayon_core::registry::main_loop
18: std::panicking::try::do_call
19: _rust_maybe_catch_panic
at src\libpanic_unwind/lib.rs:87
20: <F as alloc::boxed::FnBox<A>>::call_box
21: std::sys::windows::thread::Thread::new::thread_start
at /rustc/6c2484dc3c532c052f159264e970278d8b77cdc9\src\liballoc/boxed.rs:759
at src\libstd\sys_common/thread.rs:14
at src\libstd\sys\windows/thread.rs:47
22: unit_addrs_search
23: unit_addrs_search
cc @eddyb Any reason why this might be failing?
Unfortunately I don't know an easy way to determine which files are causing the issue, but here's some debugging information I attached to that failed lookup:
I'm tempted to say go ahead and land this; snapshot tests work fine, it's just the ambiguity check that's failing, and that's on gll for building us a bad forest with the generated parser.
However, I'm hesitant since we want to add in %%
usage and we should be able to see the coverage change (which should be 0) for that refactor.
A minimal PR to get this repo pointed at rust-lang/gll instead of rust-lang-nursery/gll would be to just update the manifest to point at the currently rust-lang-nursery/gll/master revision in rust-lang/gll.
r? @qmx
Minimal panic repro: https://gist.github.com/CAD97/e5c6cba85f110c13c5d6a1fc66a218cc
cargo +nightly run --release --bin coverage -- file --graphviz-forest forest.dot test.rs
Let's bump GLL again, wait for travis to go green, and then merge. 🎉
master CI:
local:
fork CI:
PR CI