mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
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:
parent
6abf25e3a8
commit
bf63c45b46
12 changed files with 10 additions and 47 deletions
|
@ -432,13 +432,9 @@ pub fn load_modules_for_files(filenames: Vec<PathBuf>) -> Vec<LoadedModule> {
|
|||
let mut modules = Vec::with_capacity(filenames.len());
|
||||
|
||||
for filename in filenames {
|
||||
let mut src_dir = filename.clone();
|
||||
src_dir.pop();
|
||||
|
||||
match roc_load::load_and_typecheck(
|
||||
&arena,
|
||||
filename,
|
||||
src_dir,
|
||||
Default::default(),
|
||||
roc_target::TargetInfo::default_x86_64(), // This is just type-checking for docs, so "target" doesn't matter
|
||||
roc_reporting::report::RenderTarget::ColorTerminal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue