[m-rev.] for review: Put .err_date files in grade-specific subdirectory.
Peter Wang
novalazy at gmail.com
Fri Jul 26 15:28:17 AEST 2024
Put .err_date files in grade-specific subdirectory when
--use-grade-subdirs is in effect.
compiler/file_names.m:
Replace ext_cur_ngs_misc_err_date with a new constructor,
ext_cur_ngs_gs_misc_err_date, in the ext_cur_ngs_gs category.
compiler/make.file_names.m:
compiler/make.module_target.m:
Conform the the above change.
diff --git a/compiler/file_names.m b/compiler/file_names.m
index 1f972c5cd..d28b93b9c 100644
--- a/compiler/file_names.m
+++ b/compiler/file_names.m
@@ -300,17 +300,6 @@
% a NON-grade-specific extension? If *anything* in a .module_dep
% file can *ever* be grade dependent, this should be a
% grade-specific extension.
- ; ext_cur_ngs_misc_err_date % ".err_date"
- % XXX DODGY If you recompile a module in a different grade,
- % the contents of the .err file may change, for example
- % because one grade satisfies the requirements of a
- % require_feature_set declaration and the other does not.
- % To me (zs), this argues in favor of .err_date files
- % belonging in a grade-specific directory. The fact that
- % it would obviously be harder to people to find them there
- % is not relevant, since people shouldn't *have* to find
- % .err_date files.
- % XXX zs and juliensf agree on this.
; ext_cur_ngs_misc_prof. % ".prof"
% XXX DODGY Given that different profiling grades generate
% different profiles (specifically, they produce different subsets
@@ -409,6 +398,7 @@
; ext_cur_ngs_gs_an_ds_status % ".analysis_status"
% Misc extensions.
+ ; ext_cur_ngs_gs_misc_err_date % ".err_date"
; ext_cur_ngs_gs_misc_used % ".used"
; ext_cur_ngs_gs_misc_track_flags. % ".track_flags"
@@ -793,7 +783,6 @@ ext_cur_ngs_extension_dir(Ext, Str, Dir) :-
; Ext = ext_cur_ngs_mf_dep, Str = ".dep", Dir = "deps"
; Ext = ext_cur_ngs_misc_module_dep,
Str = ".module_dep",Dir = "module_deps"
- ; Ext = ext_cur_ngs_misc_err_date, Str = ".err_date", Dir = "err_dates"
; Ext = ext_cur_ngs_misc_prof, Str = ".prof", Dir = "profs"
).
@@ -876,6 +865,8 @@ ext_cur_ngs_gs_extension_dir(Globals, Ext, Str, Dir) :-
Str = ".analysis_date", Dir = "analysis_dates"
; Ext = ext_cur_ngs_gs_an_ds_status,
Str = ".analysis_status", Dir = "analysis_statuss"
+ ; Ext = ext_cur_ngs_gs_misc_err_date,
+ Str = ".err_date", Dir = "err_dates"
; Ext = ext_cur_ngs_gs_misc_used,
Str = ".used", Dir = "useds"
; Ext = ext_cur_ngs_gs_misc_track_flags,
diff --git a/compiler/make.file_names.m b/compiler/make.file_names.m
index 0fab770bb..c93c67a43 100644
--- a/compiler/make.file_names.m
+++ b/compiler/make.file_names.m
@@ -263,7 +263,7 @@ date_file_extension(ModuleTargetType, Ext) :-
% We need a timestamp file for `.err' files because errors are written
% to the `.err' file even when writing interfaces. The timestamp
% is only updated when compiling to target code.
- Ext = ext_cur_ngs(ext_cur_ngs_misc_err_date)
+ Ext = ext_cur_ngs_gs(ext_cur_ngs_gs_misc_err_date)
;
ModuleTargetType = module_target_int0,
Ext = ext_cur_ngs(ext_cur_ngs_int_date_int0)
diff --git a/compiler/make.module_target.m b/compiler/make.module_target.m
index 75a1b3bb6..41c7692fc 100644
--- a/compiler/make.module_target.m
+++ b/compiler/make.module_target.m
@@ -453,7 +453,7 @@ build_target_2(ProgressStream, ErrorStream, Globals, Task, ModuleName,
% The `.err_date' file is needed because the `.err' file is touched
% by all phases of compilation, including writing interfaces.
touch_module_ext_datestamp(Globals, ProgressStream,
- ModuleName, ext_cur_ngs(ext_cur_ngs_misc_err_date),
+ ModuleName, ext_cur_ngs_gs(ext_cur_ngs_gs_misc_err_date),
TouchSucceeded, !IO),
Succeeded = CompileSucceeded `and` TouchSucceeded
else
--
2.44.0
More information about the reviews
mailing list