Compute src_dir from original filename

This fixed a bug where bindgen was providing cwd() for src_dir,
but actually the src_dir should have been based on the filename.
This prevents that problem from happening in the future!
This commit is contained in:
Richard Feldman 2022-07-13 12:49:06 -04:00
parent 6abf25e3a8
commit bf63c45b46
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
12 changed files with 10 additions and 47 deletions

View file

@ -10,15 +10,6 @@ pub fn load_module(src_file: &Path, threading: Threading) -> LoadedModule {
let loaded = roc_load::load_and_typecheck(
&arena,
src_file.to_path_buf(),
src_file
.parent()
.unwrap_or_else(|| {
panic!(
"src_file {:?} did not have a parent directory but I need to have one.",
src_file
)
})
.to_path_buf(),
subs_by_module,
TargetInfo::default_x86_64(),
roc_reporting::report::RenderTarget::ColorTerminal,