Commit Graph

2 Commits

Author SHA1 Message Date
Zoltan Somogyi
1b093f34ee Stop using a type where it does not belong.
compiler/module_imports.m:
    The module_timestamp type has long had a field of the need_qualifier type.
    For a year or more now, this field has had a big comment on it explaining
    why its use here does not match the semantics of the need_qualifier type.

    This diff gives this field a new, bespoke type, that is isomorphic
    to need_qualifier, but is completely deparate. Document the reason why
    I *can't* document the semantics of this new type :-(

compiler/grab_modules.m:
    Do the same kind of replacement on values that are used only to set
    this field of module_timestamps.

compiler/recompilation.check.m:
compiler/recompilation.usage.m:
    Use the values of the new type to make the same decisions we used to make
    using values of the need_qualifier type.

tests/recompilation/*.m*:
    Bring the programming style of these modules up to date.

tests/recompilation/*.err_exp.2:
    Expect the updated line numbers in messages.

Delete the need_qualifier field from timestamps.
2019-11-09 17:53:43 +11:00
Simon Taylor
d26863ea86 Fix bugs in the handling of nested sub-modules with --smart-recompilation.
Estimated hours taken: 1
Branches: main

Fix bugs in the handling of nested sub-modules with --smart-recompilation.

compiler/recompilation_check.m:
	If an error occurs before the nested sub-modules of the top-level
	module are known, recompile all of the nested sub-modules.

	If there is a syntax error in a `.used' file, recompile all
	sub-modules. This makes the above change simpler, and is probably
	a good idea anyway -- all outputs from a compilation which produces
	output files containing syntax errors are suspect.

compiler/mercury_compile.m:
	When working out the list of sub-modules of the main module
	in a source file, use all the sub-modules, not just the ones
	that are being recompiled.

tests/recompilation/Mmakefile:
tests/recompilation/TESTS:
tests/recompilation/nested_module_2_r*:
	Test case.
2001-10-24 05:56:41 +00:00