@@ -176,10 +176,10 @@ def __setitem__(self: Self, key: str, value: Config | ResolvedConfig) -> None:
176176 """
177177 super ().__setitem__ (
178178 key ,
179- self ._resolve (value ) if isinstance (value , Config ) else value ,
179+ self ._resolve (key , value ) if isinstance (value , Config ) else value ,
180180 )
181181
182- def _resolve (self : Self , config : Config ) -> ResolvedConfig :
182+ def _resolve (self : Self , module_name : str , config : Config ) -> ResolvedConfig :
183183 if not pathlib .Path (config .project_directory ).is_absolute ():
184184 msg = f'Expected absolute project directory, but got relative directory "{ config .project_directory } "'
185185 raise ValueError (msg )
@@ -215,6 +215,7 @@ def _resolve(self: Self, config: Config) -> ResolvedConfig:
215215 full_project_directory = pathlib .Path (config .project_directory ).resolve (),
216216 full_build_directory = self ._find_build_directory (
217217 build_directory = config .build_directory ,
218+ module_name = module_name ,
218219 project_directory = config .project_directory ,
219220 verbose = config .verbose ,
220221 ),
@@ -233,6 +234,7 @@ def _find_build_directory(
233234 self : Self ,
234235 * ,
235236 build_directory : pathlib .Path | str | None ,
237+ module_name : str ,
236238 project_directory : pathlib .Path | str ,
237239 verbose : bool ,
238240 ) -> pathlib .Path :
@@ -270,7 +272,7 @@ def _find_build_directory(
270272 full_build_directory = (
271273 pathlib .Path (tempfile .gettempdir ())
272274 / f"charonload-of-{ getpass .getuser ()} "
273- / f"{ full_project_directory . name } _build_{ path_hash } "
275+ / f"{ module_name } _build_{ path_hash } "
274276 )
275277
276278 return full_build_directory
0 commit comments