mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +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
|
@ -92,7 +92,6 @@ pub fn load_and_monomorphize_from_str<'a>(
|
|||
pub fn load_and_monomorphize(
|
||||
arena: &Bump,
|
||||
filename: PathBuf,
|
||||
src_dir: PathBuf,
|
||||
exposed_types: ExposedByModule,
|
||||
target_info: TargetInfo,
|
||||
render: RenderTarget,
|
||||
|
@ -100,7 +99,7 @@ pub fn load_and_monomorphize(
|
|||
) -> Result<MonomorphizedModule<'_>, LoadingProblem<'_>> {
|
||||
use LoadResult::*;
|
||||
|
||||
let load_start = LoadStart::from_path(arena, src_dir, filename, render)?;
|
||||
let load_start = LoadStart::from_path(arena, filename, render)?;
|
||||
|
||||
match load(
|
||||
arena,
|
||||
|
@ -119,7 +118,6 @@ pub fn load_and_monomorphize(
|
|||
pub fn load_and_typecheck(
|
||||
arena: &Bump,
|
||||
filename: PathBuf,
|
||||
src_dir: PathBuf,
|
||||
exposed_types: ExposedByModule,
|
||||
target_info: TargetInfo,
|
||||
render: RenderTarget,
|
||||
|
@ -127,7 +125,7 @@ pub fn load_and_typecheck(
|
|||
) -> Result<LoadedModule, LoadingProblem<'_>> {
|
||||
use LoadResult::*;
|
||||
|
||||
let load_start = LoadStart::from_path(arena, src_dir, filename, render)?;
|
||||
let load_start = LoadStart::from_path(arena, filename, render)?;
|
||||
|
||||
match load(
|
||||
arena,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue