We planned to upgrade GitLab and Mattermost to the latest version this Friday morning (early). You may experience some downtime!

Commit 401cd9c9 authored by John van Groningen's avatar John van Groningen

fix compiling of hierarchical modules using the Sync method (in Environment dialog)

parent 7bdb908c
......@@ -57,7 +57,7 @@ CompileProjectModule :: !CompileOrCheckSyntax !Pathname !Project !SetMadeProject
CompileProjectModule compileOrCheckSyntax imp_pathname project setproject ps
# ps = ClearCompilerCache` ps
# (srcpaths,ps) = get_project_and_environment_paths project ps
# (mdn,imp_pathname) = determine_dir_and_filename imp_pathname srcpaths
# (mdn,hierarchical_imp_pathname) = determine_dir_and_filename imp_pathname srcpaths
#! (abccache,ps) = getABCCache ps
#! (fileinfo,ps) = getFICache` ps
#! ((errs,warns,dircache),ps)
......@@ -65,7 +65,7 @@ CompileProjectModule compileOrCheckSyntax imp_pathname project setproject ps
# ({be_verbose},ps) = getPrefs ps
#! ps = HandleDCErrors be_verbose errs warns ps
#! (fileinfo,abccache,project,ok,newpaths,_,_,_,ps)
= CompileTheProjectModule compileOrCheckSyntax mdn imp_pathname fileinfo abccache project dircache ps
= CompileTheProjectModule compileOrCheckSyntax mdn hierarchical_imp_pathname fileinfo abccache project dircache ps
# ps = setABCCache abccache ps
# ps = setFICache fileinfo ps
= setproject ok newpaths project ps
......@@ -74,7 +74,7 @@ GenAsmProjectModule :: !.Pathname !Project !SetMadeProjectFun !*GeneralSt -> *Ge
GenAsmProjectModule imp_pathname project setproject ps
# ps = ClearCompilerCache` ps
# (srcpaths,ps) = get_project_and_environment_paths project ps
# (mdn,imp_pathname) = determine_dir_and_filename imp_pathname srcpaths
# (mdn,hierarchical_imp_pathname) = determine_dir_and_filename imp_pathname srcpaths
# (abccache,ps) = getABCCache ps
#! (fileinfo,ps) = getFICache` ps
# ((errs,warns,dircache),ps)
......@@ -82,7 +82,7 @@ GenAsmProjectModule imp_pathname project setproject ps
# ({be_verbose},ps) = getPrefs ps
# ps = HandleDCErrors be_verbose errs warns ps
# (fileinfo,abccache,project,ok,newpaths,abcpath,_,_,ps)
= CompileTheProjectModule Compilation mdn imp_pathname fileinfo abccache project dircache ps
= CompileTheProjectModule Compilation mdn hierarchical_imp_pathname fileinfo abccache project dircache ps
| not ok || newpaths
# ps = setABCCache abccache ps
# ps = setFICache fileinfo ps
......@@ -1027,7 +1027,6 @@ UpdateDependencies :: !Bool !ModuleDirAndName ![!ModuleDirAndName] !DriverCompil
-> (*GeneralSt,*DirCache,Bool,Bool,[!ModuleDirAndName],DriverCompilingInfo,DriverStateRecord,Bool)
UpdateDependencies force mdn rest compinfo dircache ds ps`
# module_name = mdn.mdn_name
impname = ModuleDirAndNameToImpPathname mdn
co = case PR_GetModuleInfo module_name project of
Just modinfo -> modinfo.compilerOptions
_ -> defaultCO
......@@ -1044,7 +1043,7 @@ UpdateDependencies force mdn rest compinfo dircache ds ps`
| not abcexists
# lines = Level3 ["["+++module_name+++".icl,]: no abc file"]
#! ps = showInfo lines ps
= compile_module compinfo mdn impname rest co dircache ds ps
= compile_module compinfo mdn rest co dircache ds ps
| info.sys // system module
# wrongVersion = info.version <> version
| wrongVersion
......@@ -1062,7 +1061,7 @@ UpdateDependencies force mdn rest compinfo dircache ds ps`
# (patched, ps) = accFiles (PatchSystemABC version True abcPath /*ao.memoryProfiling*/ wantstp) ps
| patched
# ((abcdate,fileinfo), ps)
= accFiles (FI_UpdateAbcDate impname abcPath wantstp ds.fileinfo) ps
= accFiles (FI_UpdateAbcDate module_name abcPath wantstp ds.fileinfo) ps
# ds = {ds & fileinfo = fileinfo}
# ((ok,mods,_,_,objs,libs,abccache),ps)
= accFiles (ParseABCDependencies` info.abcpath abcdate ds.abccache) ps
......@@ -1105,7 +1104,7 @@ UpdateDependencies force mdn rest compinfo dircache ds ps`
| force
# lines = Level3 ["["+++module_name+++".icl,]: force compile"]
#! ps = showInfo lines ps
= compile_module compinfo mdn impname rest co dircache ds ps
= compile_module compinfo mdn rest co dircache ds ps
# ((ok,mods,xxx_md,xxx_dd,objs,libs,abccache),ps)
= accFiles (ParseABCDependencies` info.abcpath info.abcdate ds.abccache) ps
# ds = {ds & abccache = abccache}
......@@ -1130,7 +1129,7 @@ UpdateDependencies force mdn rest compinfo dircache ds ps`
# lines = Level3 [if okC whyA whyC]
#! ps = showInfo lines ps
= compile_module compinfo mdn impname rest co dircache ds ps
= compile_module compinfo mdn rest co dircache ds ps
where
(prefs,ps) = getPrefs ps` // lift to DriverState
......@@ -1145,18 +1144,19 @@ where
verbose = prefs.be_verbose
defaultCO = prefs.compopts
compile_module Sync mdn impname rest co dircache ds ps
= UpdateSyncDependencies mdn rest impname co dircache ds ps
compile_module (Async current async_compiling_info) mdn impname rest co dircache ds ps
compile_module Sync mdn rest co dircache ds ps
= UpdateSyncDependencies mdn rest co dircache ds ps
compile_module (Async current async_compiling_info) mdn rest co dircache ds ps
= UpdateAsyncDependencies current async_compiling_info mdn rest co dircache ds ps
compile_module (AsyncWin current win_compiling_info) mdn impname rest co dircache ds ps
compile_module (AsyncWin current win_compiling_info) mdn rest co dircache ds ps
= UpdateAsyncDependenciesWin current win_compiling_info mdn rest co dircache ds ps
compile_module (Pers info) mdn impname rest co dircache ds ps
compile_module (Pers info) mdn rest co dircache ds ps
= UpdatePersDependencies mdn info rest co dircache ds ps
UpdateSyncDependencies mdn rest impname co dircache ds ps
UpdateSyncDependencies mdn rest co dircache ds ps
# hierarchical_imp_pathname = MakeFullPathname mdn.mdn_dir (mdn.mdn_name +++ ".icl")
# (fileinfo,abccache,project,ok,newpaths,_,deps,dircache,ps)
= CompileTheProjectModule Compilation mdn impname ds.fileinfo ds.abccache ds.project dircache ps
= CompileTheProjectModule Compilation mdn hierarchical_imp_pathname ds.fileinfo ds.abccache ds.project dircache ps
# ds = {ds & fileinfo = fileinfo, abccache = abccache, project = project}
= (ps,dircache,ok,newpaths,deps++|rest,Sync,ds,ok)
......@@ -1207,14 +1207,14 @@ UpdatePersDependencies mdn cstate rest co dircache ds ps
// Compile the designated module.
CompileTheProjectModule :: !CompileOrCheckSyntax !ModuleDirAndName !Pathname !FileInfoCache !*ABCCache !Project !*DirCache !*GeneralSt
-> *(FileInfoCache,*ABCCache,Project,Bool,Bool,Pathname,[!ModuleDirAndName],*DirCache,*GeneralSt)
CompileTheProjectModule compileOrCheckSyntax mdn imp_pathname fileinfo abccache project dircache ps
CompileTheProjectModule compileOrCheckSyntax mdn hierarchical_imp_pathname fileinfo abccache project dircache ps
# (ok,ccstring,write_module_times,errwin,typwin,srcpaths,mp,tp,eod,co,startupdir,ps)
= ShowInfoAndCompile compileOrCheckSyntax mdn.mdn_name project ps
| not ok
= (fileinfo,abccache,project,False,False,"",[!],dircache,ps)
# (use_compiler_process_ids,compiler_process_ids,ps) = get_use_compiler_process_ids_and_compiler_process_ids ps
# (abcpath,res,compiler_process_ids,ps)
= Compile ccstring use_compiler_process_ids write_module_times errwin typwin compileOrCheckSyntax mdn imp_pathname srcpaths mp tp eod co startupdir compiler_process_ids ps
= Compile ccstring use_compiler_process_ids write_module_times errwin typwin compileOrCheckSyntax mdn hierarchical_imp_pathname srcpaths mp tp eod co startupdir compiler_process_ids ps
# ps = setCompilerProcessIds compiler_process_ids ps
# (_,res) = ProcessCompilerMsg Nothing compileOrCheckSyntax co mdn abcpath res fileinfo dircache abccache project ps
= res
......@@ -1307,9 +1307,9 @@ ProcessCompilerMsg cstate compileOrCheckSyntax _ mdn abcpath (Patherror pathname
# (pinfo,ps) = ExitCleanCompiler (pinfo, ps)
-> (Just pinfo, ps)
// RWS: this compile is still blocking...
# imp_pathname = ModuleDirAndNameToImpPathname mdn
# hierarchical_imp_pathname = MakeFullPathname mdn.mdn_dir (mdn.mdn_name +++ ".icl")
# (fileinfo,abccache,project,ok,_,abcpath,deps,dircache,ps)
= CompileTheProjectModule compileOrCheckSyntax mdn imp_pathname fileinfo abccache project dircache ps
= CompileTheProjectModule compileOrCheckSyntax mdn hierarchical_imp_pathname fileinfo abccache project dircache ps
= (cstate,(fileinfo,abccache,project,ok,True,abcpath,deps,dircache,ps))
= (cstate,(fileinfo,abccache,project,False,new,abcpath,[!],dircache,ps))
where
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment