mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Fix panic on parse error in Package-Config.roc
This previously led to the following panic if there was a parse error in Package-Config.roc: 'There were still outstanding Arc references to module_ids', /Users/rtfeldman/code/roc/compiler/load/src/file.rs:1530:33
This commit is contained in:
parent
009f1b7eca
commit
7f5fc37612
1 changed files with 1 additions and 7 deletions
|
@ -1525,13 +1525,7 @@ where
|
||||||
Msg::FailedToParse(problem) => {
|
Msg::FailedToParse(problem) => {
|
||||||
shut_down_worker_threads!();
|
shut_down_worker_threads!();
|
||||||
|
|
||||||
let module_ids = Arc::try_unwrap(state.arc_modules)
|
let module_ids = (*state.arc_modules).lock().clone().into_module_ids();
|
||||||
.unwrap_or_else(|_| {
|
|
||||||
panic!("There were still outstanding Arc references to module_ids")
|
|
||||||
})
|
|
||||||
.into_inner()
|
|
||||||
.into_module_ids();
|
|
||||||
|
|
||||||
let buf = to_parse_problem_report(
|
let buf = to_parse_problem_report(
|
||||||
problem,
|
problem,
|
||||||
module_ids,
|
module_ids,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue