mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
report errors per-module
This commit is contained in:
parent
2fb803cdd0
commit
af0600dc25
4 changed files with 109 additions and 62 deletions
|
@ -194,42 +194,37 @@ fn gen(src: &[u8], target: Triple, opt_level: OptLevel) -> Result<ReplOutput, Fa
|
||||||
exposed_types,
|
exposed_types,
|
||||||
);
|
);
|
||||||
|
|
||||||
let loaded = loaded.expect("failed to load module");
|
let mut loaded = loaded.expect("failed to load module");
|
||||||
|
|
||||||
use roc_load::file::MonomorphizedModule;
|
use roc_load::file::MonomorphizedModule;
|
||||||
let MonomorphizedModule {
|
let MonomorphizedModule {
|
||||||
can_problems,
|
|
||||||
type_problems,
|
|
||||||
mono_problems,
|
|
||||||
mut procedures,
|
mut procedures,
|
||||||
interns,
|
interns,
|
||||||
exposed_to_host,
|
exposed_to_host,
|
||||||
mut subs,
|
mut subs,
|
||||||
module_id: home,
|
module_id: home,
|
||||||
|
sources,
|
||||||
..
|
..
|
||||||
} = loaded;
|
} = loaded;
|
||||||
|
|
||||||
let error_count = can_problems.len() + type_problems.len() + mono_problems.len();
|
let mut lines = Vec::new();
|
||||||
|
|
||||||
if error_count > 0 {
|
for (home, (module_path, src)) in sources {
|
||||||
// There were problems; report them and return.
|
let can_problems = loaded.can_problems.remove(&home).unwrap_or_default();
|
||||||
let src_lines: Vec<&str> = module_src.split('\n').collect();
|
let type_problems = loaded.type_problems.remove(&home).unwrap_or_default();
|
||||||
|
let mono_problems = loaded.mono_problems.remove(&home).unwrap_or_default();
|
||||||
|
|
||||||
// Used for reporting where an error came from.
|
let error_count = can_problems.len() + type_problems.len() + mono_problems.len();
|
||||||
//
|
|
||||||
// TODO: maybe Reporting should have this be an Option?
|
|
||||||
let path = PathBuf::new();
|
|
||||||
|
|
||||||
// Report problems
|
let src_lines: Vec<&str> = src.split('\n').collect();
|
||||||
let palette = DEFAULT_PALETTE;
|
let palette = DEFAULT_PALETTE;
|
||||||
|
|
||||||
// Report parsing and canonicalization problems
|
// Report parsing and canonicalization problems
|
||||||
let alloc = RocDocAllocator::new(&src_lines, home, &interns);
|
let alloc = RocDocAllocator::new(&src_lines, home, &interns);
|
||||||
|
|
||||||
let mut lines = Vec::with_capacity(error_count);
|
let problems = loaded.can_problems.remove(&home).unwrap_or_default();
|
||||||
|
for problem in problems.into_iter() {
|
||||||
for problem in can_problems.into_iter() {
|
let report = can_problem(&alloc, module_path.clone(), problem);
|
||||||
let report = can_problem(&alloc, path.clone(), problem);
|
|
||||||
let mut buf = String::new();
|
let mut buf = String::new();
|
||||||
|
|
||||||
report.render_color_terminal(&mut buf, &alloc, &palette);
|
report.render_color_terminal(&mut buf, &alloc, &palette);
|
||||||
|
@ -237,8 +232,9 @@ fn gen(src: &[u8], target: Triple, opt_level: OptLevel) -> Result<ReplOutput, Fa
|
||||||
lines.push(buf);
|
lines.push(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
for problem in type_problems.into_iter() {
|
let problems = loaded.type_problems.remove(&home).unwrap_or_default();
|
||||||
let report = type_problem(&alloc, path.clone(), problem);
|
for problem in problems {
|
||||||
|
let report = type_problem(&alloc, module_path.clone(), problem);
|
||||||
let mut buf = String::new();
|
let mut buf = String::new();
|
||||||
|
|
||||||
report.render_color_terminal(&mut buf, &alloc, &palette);
|
report.render_color_terminal(&mut buf, &alloc, &palette);
|
||||||
|
@ -246,15 +242,18 @@ fn gen(src: &[u8], target: Triple, opt_level: OptLevel) -> Result<ReplOutput, Fa
|
||||||
lines.push(buf);
|
lines.push(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
for problem in mono_problems.into_iter() {
|
let problems = loaded.mono_problems.remove(&home).unwrap_or_default();
|
||||||
let report = mono_problem(&alloc, path.clone(), problem);
|
for problem in problems {
|
||||||
|
let report = mono_problem(&alloc, module_path.clone(), problem);
|
||||||
let mut buf = String::new();
|
let mut buf = String::new();
|
||||||
|
|
||||||
report.render_color_terminal(&mut buf, &alloc, &palette);
|
report.render_color_terminal(&mut buf, &alloc, &palette);
|
||||||
|
|
||||||
lines.push(buf);
|
lines.push(buf);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if !lines.is_empty() {
|
||||||
Ok(ReplOutput::Problems(lines))
|
Ok(ReplOutput::Problems(lines))
|
||||||
} else {
|
} else {
|
||||||
let context = Context::create();
|
let context = Context::create();
|
||||||
|
|
2
cli/tests/fixtures/multi-dep-str/Dep1.roc
vendored
2
cli/tests/fixtures/multi-dep-str/Dep1.roc
vendored
|
@ -1,4 +1,4 @@
|
||||||
interface Dep1 exposes [ str1 ] imports [ Dep2 ]
|
interface Dep1 exposes [ str1 ] imports [ Dep2 ]
|
||||||
|
|
||||||
str1 : Str
|
str1 : Str
|
||||||
str1 = Dep2.str2
|
str1 = Dep2.str2 {}
|
||||||
|
|
|
@ -14,38 +14,52 @@ use target_lexicon::Triple;
|
||||||
#[allow(clippy::cognitive_complexity)]
|
#[allow(clippy::cognitive_complexity)]
|
||||||
pub fn gen_from_mono_module(
|
pub fn gen_from_mono_module(
|
||||||
arena: &Bump,
|
arena: &Bump,
|
||||||
loaded: MonomorphizedModule,
|
mut loaded: MonomorphizedModule,
|
||||||
file_path: PathBuf,
|
_file_path: PathBuf,
|
||||||
target: Triple,
|
target: Triple,
|
||||||
app_o_file: &Path,
|
app_o_file: &Path,
|
||||||
opt_level: OptLevel,
|
opt_level: OptLevel,
|
||||||
) {
|
) {
|
||||||
use roc_reporting::report::{can_problem, type_problem, RocDocAllocator, DEFAULT_PALETTE};
|
use roc_reporting::report::{
|
||||||
|
can_problem, mono_problem, type_problem, RocDocAllocator, DEFAULT_PALETTE,
|
||||||
|
};
|
||||||
|
|
||||||
let src = loaded.src;
|
for (home, (module_path, src)) in loaded.sources {
|
||||||
let home = loaded.module_id;
|
let src_lines: Vec<&str> = src.split('\n').collect();
|
||||||
let src_lines: Vec<&str> = src.split('\n').collect();
|
let palette = DEFAULT_PALETTE;
|
||||||
let palette = DEFAULT_PALETTE;
|
|
||||||
|
|
||||||
// Report parsing and canonicalization problems
|
// Report parsing and canonicalization problems
|
||||||
let alloc = RocDocAllocator::new(&src_lines, home, &loaded.interns);
|
let alloc = RocDocAllocator::new(&src_lines, home, &loaded.interns);
|
||||||
|
|
||||||
for problem in loaded.can_problems.into_iter() {
|
let problems = loaded.can_problems.remove(&home).unwrap_or_default();
|
||||||
let report = can_problem(&alloc, file_path.clone(), problem);
|
for problem in problems.into_iter() {
|
||||||
let mut buf = String::new();
|
let report = can_problem(&alloc, module_path.clone(), problem);
|
||||||
|
let mut buf = String::new();
|
||||||
|
|
||||||
report.render_color_terminal(&mut buf, &alloc, &palette);
|
report.render_color_terminal(&mut buf, &alloc, &palette);
|
||||||
|
|
||||||
println!("\n{}\n", buf);
|
println!("\n{}\n", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
for problem in loaded.type_problems.into_iter() {
|
let problems = loaded.type_problems.remove(&home).unwrap_or_default();
|
||||||
let report = type_problem(&alloc, file_path.clone(), problem);
|
for problem in problems {
|
||||||
let mut buf = String::new();
|
let report = type_problem(&alloc, module_path.clone(), problem);
|
||||||
|
let mut buf = String::new();
|
||||||
|
|
||||||
report.render_color_terminal(&mut buf, &alloc, &palette);
|
report.render_color_terminal(&mut buf, &alloc, &palette);
|
||||||
|
|
||||||
println!("\n{}\n", buf);
|
println!("\n{}\n", buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
let problems = loaded.mono_problems.remove(&home).unwrap_or_default();
|
||||||
|
for problem in problems {
|
||||||
|
let report = mono_problem(&alloc, module_path.clone(), problem);
|
||||||
|
let mut buf = String::new();
|
||||||
|
|
||||||
|
report.render_color_terminal(&mut buf, &alloc, &palette);
|
||||||
|
|
||||||
|
println!("\n{}\n", buf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the binary
|
// Generate the binary
|
||||||
|
|
|
@ -201,6 +201,8 @@ impl Dependencies {
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
struct ModuleCache<'a> {
|
struct ModuleCache<'a> {
|
||||||
module_names: MutMap<ModuleId, ModuleName>,
|
module_names: MutMap<ModuleId, ModuleName>,
|
||||||
|
|
||||||
|
/// Phases
|
||||||
headers: MutMap<ModuleId, ModuleHeader<'a>>,
|
headers: MutMap<ModuleId, ModuleHeader<'a>>,
|
||||||
parsed: MutMap<ModuleId, ParsedModule<'a>>,
|
parsed: MutMap<ModuleId, ParsedModule<'a>>,
|
||||||
canonicalized: MutMap<ModuleId, CanonicalizedModule<'a>>,
|
canonicalized: MutMap<ModuleId, CanonicalizedModule<'a>>,
|
||||||
|
@ -209,7 +211,14 @@ struct ModuleCache<'a> {
|
||||||
typechecked: MutMap<ModuleId, TypeCheckedModule<'a>>,
|
typechecked: MutMap<ModuleId, TypeCheckedModule<'a>>,
|
||||||
found_specializations: MutMap<ModuleId, FoundSpecializationsModule<'a>>,
|
found_specializations: MutMap<ModuleId, FoundSpecializationsModule<'a>>,
|
||||||
external_specializations_requested: MutMap<ModuleId, ExternalSpecializations>,
|
external_specializations_requested: MutMap<ModuleId, ExternalSpecializations>,
|
||||||
|
|
||||||
|
/// Various information
|
||||||
documentation: MutMap<ModuleId, ModuleDocumentation>,
|
documentation: MutMap<ModuleId, ModuleDocumentation>,
|
||||||
|
can_problems: MutMap<ModuleId, Vec<roc_problem::can::Problem>>,
|
||||||
|
type_problems: MutMap<ModuleId, Vec<solve::TypeError>>,
|
||||||
|
mono_problems: MutMap<ModuleId, Vec<roc_mono::ir::MonoProblem>>,
|
||||||
|
|
||||||
|
sources: MutMap<ModuleId, (PathBuf, &'a str)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn start_phase<'a>(module_id: ModuleId, phase: Phase, state: &mut State<'a>) -> BuildTask<'a> {
|
fn start_phase<'a>(module_id: ModuleId, phase: Phase, state: &mut State<'a>) -> BuildTask<'a> {
|
||||||
|
@ -399,8 +408,8 @@ pub struct LoadedModule {
|
||||||
pub module_id: ModuleId,
|
pub module_id: ModuleId,
|
||||||
pub interns: Interns,
|
pub interns: Interns,
|
||||||
pub solved: Solved<Subs>,
|
pub solved: Solved<Subs>,
|
||||||
pub can_problems: Vec<roc_problem::can::Problem>,
|
pub can_problems: MutMap<ModuleId, Vec<roc_problem::can::Problem>>,
|
||||||
pub type_problems: Vec<solve::TypeError>,
|
pub type_problems: MutMap<ModuleId, Vec<solve::TypeError>>,
|
||||||
pub declarations_by_id: MutMap<ModuleId, Vec<Declaration>>,
|
pub declarations_by_id: MutMap<ModuleId, Vec<Declaration>>,
|
||||||
pub exposed_to_host: MutMap<Symbol, Variable>,
|
pub exposed_to_host: MutMap<Symbol, Variable>,
|
||||||
pub src: Box<str>,
|
pub src: Box<str>,
|
||||||
|
@ -417,6 +426,7 @@ pub enum BuildProblem<'a> {
|
||||||
struct ModuleHeader<'a> {
|
struct ModuleHeader<'a> {
|
||||||
module_id: ModuleId,
|
module_id: ModuleId,
|
||||||
module_name: ModuleName,
|
module_name: ModuleName,
|
||||||
|
module_path: PathBuf,
|
||||||
exposed_ident_ids: IdentIds,
|
exposed_ident_ids: IdentIds,
|
||||||
deps_by_name: MutMap<ModuleName, ModuleId>,
|
deps_by_name: MutMap<ModuleName, ModuleId>,
|
||||||
imported_modules: MutSet<ModuleId>,
|
imported_modules: MutSet<ModuleId>,
|
||||||
|
@ -464,12 +474,12 @@ pub struct MonomorphizedModule<'a> {
|
||||||
pub module_id: ModuleId,
|
pub module_id: ModuleId,
|
||||||
pub interns: Interns,
|
pub interns: Interns,
|
||||||
pub subs: Subs,
|
pub subs: Subs,
|
||||||
pub can_problems: Vec<roc_problem::can::Problem>,
|
pub can_problems: MutMap<ModuleId, Vec<roc_problem::can::Problem>>,
|
||||||
pub type_problems: Vec<solve::TypeError>,
|
pub type_problems: MutMap<ModuleId, Vec<solve::TypeError>>,
|
||||||
pub mono_problems: Vec<roc_mono::ir::MonoProblem>,
|
pub mono_problems: MutMap<ModuleId, Vec<roc_mono::ir::MonoProblem>>,
|
||||||
pub procedures: MutMap<(Symbol, Layout<'a>), Proc<'a>>,
|
pub procedures: MutMap<(Symbol, Layout<'a>), Proc<'a>>,
|
||||||
pub exposed_to_host: MutMap<Symbol, Variable>,
|
pub exposed_to_host: MutMap<Symbol, Variable>,
|
||||||
pub src: Box<str>,
|
pub sources: MutMap<ModuleId, (PathBuf, Box<str>)>,
|
||||||
pub timings: MutMap<ModuleId, ModuleTiming>,
|
pub timings: MutMap<ModuleId, ModuleTiming>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -477,6 +487,7 @@ pub struct MonomorphizedModule<'a> {
|
||||||
struct ParsedModule<'a> {
|
struct ParsedModule<'a> {
|
||||||
module_id: ModuleId,
|
module_id: ModuleId,
|
||||||
module_name: ModuleName,
|
module_name: ModuleName,
|
||||||
|
module_path: PathBuf,
|
||||||
src: &'a str,
|
src: &'a str,
|
||||||
module_timing: ModuleTiming,
|
module_timing: ModuleTiming,
|
||||||
deps_by_name: MutMap<ModuleName, ModuleId>,
|
deps_by_name: MutMap<ModuleName, ModuleId>,
|
||||||
|
@ -559,10 +570,7 @@ struct State<'a> {
|
||||||
pub stdlib: StdLib,
|
pub stdlib: StdLib,
|
||||||
pub exposed_types: SubsByModule,
|
pub exposed_types: SubsByModule,
|
||||||
|
|
||||||
pub can_problems: std::vec::Vec<roc_problem::can::Problem>,
|
|
||||||
pub mono_problems: std::vec::Vec<MonoProblem>,
|
|
||||||
pub headers_parsed: MutSet<ModuleId>,
|
pub headers_parsed: MutSet<ModuleId>,
|
||||||
pub type_problems: std::vec::Vec<solve::TypeError>,
|
|
||||||
|
|
||||||
pub module_cache: ModuleCache<'a>,
|
pub module_cache: ModuleCache<'a>,
|
||||||
pub dependencies: Dependencies,
|
pub dependencies: Dependencies,
|
||||||
|
@ -1105,9 +1113,6 @@ where
|
||||||
exposed_types,
|
exposed_types,
|
||||||
headers_parsed,
|
headers_parsed,
|
||||||
loading_started,
|
loading_started,
|
||||||
can_problems: std::vec::Vec::new(),
|
|
||||||
type_problems: std::vec::Vec::new(),
|
|
||||||
mono_problems: std::vec::Vec::new(),
|
|
||||||
arc_modules,
|
arc_modules,
|
||||||
constrained_ident_ids: IdentIds::exposed_builtins(0),
|
constrained_ident_ids: IdentIds::exposed_builtins(0),
|
||||||
ident_ids_by_module,
|
ident_ids_by_module,
|
||||||
|
@ -1267,6 +1272,11 @@ fn update<'a>(
|
||||||
Ok(state)
|
Ok(state)
|
||||||
}
|
}
|
||||||
Parsed(parsed) => {
|
Parsed(parsed) => {
|
||||||
|
state
|
||||||
|
.module_cache
|
||||||
|
.sources
|
||||||
|
.insert(parsed.module_id, (parsed.module_path.clone(), parsed.src));
|
||||||
|
|
||||||
let module_id = parsed.module_id;
|
let module_id = parsed.module_id;
|
||||||
|
|
||||||
state.module_cache.parsed.insert(parsed.module_id, parsed);
|
state.module_cache.parsed.insert(parsed.module_id, parsed);
|
||||||
|
@ -1288,7 +1298,10 @@ fn update<'a>(
|
||||||
} => {
|
} => {
|
||||||
let module_id = constrained_module.module.module_id;
|
let module_id = constrained_module.module.module_id;
|
||||||
log!("generated constraints for {:?}", module_id);
|
log!("generated constraints for {:?}", module_id);
|
||||||
state.can_problems.extend(canonicalization_problems);
|
state
|
||||||
|
.module_cache
|
||||||
|
.can_problems
|
||||||
|
.insert(module_id, canonicalization_problems);
|
||||||
|
|
||||||
state
|
state
|
||||||
.module_cache
|
.module_cache
|
||||||
|
@ -1329,7 +1342,10 @@ fn update<'a>(
|
||||||
log!("solved types for {:?}", module_id);
|
log!("solved types for {:?}", module_id);
|
||||||
module_timing.end_time = SystemTime::now();
|
module_timing.end_time = SystemTime::now();
|
||||||
|
|
||||||
state.type_problems.extend(solved_module.problems);
|
state
|
||||||
|
.module_cache
|
||||||
|
.type_problems
|
||||||
|
.insert(module_id, solved_module.problems);
|
||||||
|
|
||||||
let work = state.dependencies.notify(module_id, Phase::SolveTypes);
|
let work = state.dependencies.notify(module_id, Phase::SolveTypes);
|
||||||
|
|
||||||
|
@ -1476,7 +1492,7 @@ fn update<'a>(
|
||||||
} => {
|
} => {
|
||||||
log!("made specializations for {:?}", module_id);
|
log!("made specializations for {:?}", module_id);
|
||||||
|
|
||||||
state.mono_problems.extend(problems);
|
state.module_cache.mono_problems.insert(module_id, problems);
|
||||||
|
|
||||||
for (module_id, requested) in external_specializations_requested {
|
for (module_id, requested) in external_specializations_requested {
|
||||||
let existing = match state
|
let existing = match state
|
||||||
|
@ -1554,12 +1570,23 @@ fn finish_specialization<'a>(
|
||||||
};
|
};
|
||||||
|
|
||||||
let State {
|
let State {
|
||||||
|
procedures,
|
||||||
|
module_cache,
|
||||||
|
..
|
||||||
|
} = state;
|
||||||
|
|
||||||
|
let ModuleCache {
|
||||||
mono_problems,
|
mono_problems,
|
||||||
type_problems,
|
type_problems,
|
||||||
can_problems,
|
can_problems,
|
||||||
procedures,
|
sources,
|
||||||
..
|
..
|
||||||
} = state;
|
} = module_cache;
|
||||||
|
|
||||||
|
let sources = sources
|
||||||
|
.into_iter()
|
||||||
|
.map(|(id, (path, src))| (id, (path, src.into())))
|
||||||
|
.collect();
|
||||||
|
|
||||||
MonomorphizedModule {
|
MonomorphizedModule {
|
||||||
can_problems,
|
can_problems,
|
||||||
|
@ -1570,7 +1597,8 @@ fn finish_specialization<'a>(
|
||||||
subs,
|
subs,
|
||||||
interns,
|
interns,
|
||||||
procedures,
|
procedures,
|
||||||
src: src.into(),
|
// src: src.into(),
|
||||||
|
sources,
|
||||||
timings: state.timings,
|
timings: state.timings,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1595,8 +1623,8 @@ fn finish<'a>(
|
||||||
module_id: state.root_id,
|
module_id: state.root_id,
|
||||||
interns,
|
interns,
|
||||||
solved,
|
solved,
|
||||||
can_problems: state.can_problems,
|
can_problems: state.module_cache.can_problems,
|
||||||
type_problems: state.type_problems,
|
type_problems: state.module_cache.type_problems,
|
||||||
declarations_by_id: state.declarations_by_id,
|
declarations_by_id: state.declarations_by_id,
|
||||||
exposed_to_host: exposed_vars_by_symbol.into_iter().collect(),
|
exposed_to_host: exposed_vars_by_symbol.into_iter().collect(),
|
||||||
src: src.into(),
|
src: src.into(),
|
||||||
|
@ -1693,6 +1721,7 @@ fn parse_header<'a>(
|
||||||
match parsed {
|
match parsed {
|
||||||
Ok((ast::Module::Interface { header }, parse_state)) => Ok(send_header(
|
Ok((ast::Module::Interface { header }, parse_state)) => Ok(send_header(
|
||||||
header.name,
|
header.name,
|
||||||
|
filename,
|
||||||
header.exposes.into_bump_slice(),
|
header.exposes.into_bump_slice(),
|
||||||
header.imports.into_bump_slice(),
|
header.imports.into_bump_slice(),
|
||||||
parse_state,
|
parse_state,
|
||||||
|
@ -1702,6 +1731,7 @@ fn parse_header<'a>(
|
||||||
)),
|
)),
|
||||||
Ok((ast::Module::App { header }, parse_state)) => Ok(send_header(
|
Ok((ast::Module::App { header }, parse_state)) => Ok(send_header(
|
||||||
header.name,
|
header.name,
|
||||||
|
filename,
|
||||||
header.provides.into_bump_slice(),
|
header.provides.into_bump_slice(),
|
||||||
header.imports.into_bump_slice(),
|
header.imports.into_bump_slice(),
|
||||||
parse_state,
|
parse_state,
|
||||||
|
@ -1776,6 +1806,7 @@ fn load_from_str<'a>(
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
fn send_header<'a>(
|
fn send_header<'a>(
|
||||||
name: Located<roc_parse::header::ModuleName<'a>>,
|
name: Located<roc_parse::header::ModuleName<'a>>,
|
||||||
|
filename: PathBuf,
|
||||||
exposes: &'a [Located<ExposesEntry<'a>>],
|
exposes: &'a [Located<ExposesEntry<'a>>],
|
||||||
imports: &'a [Located<ImportsEntry<'a>>],
|
imports: &'a [Located<ImportsEntry<'a>>],
|
||||||
parse_state: parser::State<'a>,
|
parse_state: parser::State<'a>,
|
||||||
|
@ -1895,6 +1926,7 @@ fn send_header<'a>(
|
||||||
home,
|
home,
|
||||||
Msg::Header(ModuleHeader {
|
Msg::Header(ModuleHeader {
|
||||||
module_id: home,
|
module_id: home,
|
||||||
|
module_path: filename,
|
||||||
exposed_ident_ids: ident_ids,
|
exposed_ident_ids: ident_ids,
|
||||||
module_name: declared_name,
|
module_name: declared_name,
|
||||||
imported_modules,
|
imported_modules,
|
||||||
|
@ -2145,12 +2177,14 @@ fn parse<'a>(arena: &'a Bump, header: ModuleHeader<'a>) -> Result<Msg<'a>, Loadi
|
||||||
deps_by_name,
|
deps_by_name,
|
||||||
exposed_ident_ids,
|
exposed_ident_ids,
|
||||||
exposed_imports,
|
exposed_imports,
|
||||||
|
module_path,
|
||||||
..
|
..
|
||||||
} = header;
|
} = header;
|
||||||
|
|
||||||
let parsed = ParsedModule {
|
let parsed = ParsedModule {
|
||||||
module_id,
|
module_id,
|
||||||
module_name,
|
module_name,
|
||||||
|
module_path,
|
||||||
deps_by_name,
|
deps_by_name,
|
||||||
exposed_ident_ids,
|
exposed_ident_ids,
|
||||||
exposed_imports,
|
exposed_imports,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue