Home | History | Annotate | Download | only in unit-tests
History log of /src/usr.bin/make/unit-tests/var-recursive.exp
RevisionDateAuthorComments
 1.18  13-Jun-2025  rillig make: add on-demand inter-process stack traces

When debugging a build that heavily uses nested calls to sub-makes, the
chain of calls is useful to quickly assess the situation. If explicitly
requested, include the actions from any parent processes in the stack
traces.

Reviewed by: sjg
 1.17  12-Jun-2025  rillig make: add program name to stack traces from sub-makes
 1.16  12-Jun-2025  rillig make: add quotes to "in directory" line in stack traces

The other lines in stack traces use quotes as well.
 1.15  30-Mar-2025  rillig make: use '"filename" line 123' for locations instead of 'filename:123'

The format 'filename:123' is commonly used for identifying a location in
a file. Text editors recognize it and allow quick navigation through it.
The previous format was specific to make and would have required custom
support in editors.

The new format was already used in stack traces, except for the first
line. Now all lines use the same format.
 1.14  29-Mar-2025  rillig make: in stack traces from target commands, add the command level

A target can contain several commands, and these commands are likely to
contain the same expressions. To distinguish them, add one more line to
the stack trace, to narrow down the source of the error.
 1.13  29-Aug-2024  rillig make: reduce line length in error messages

The error messages for deeply nested parse errors were hard to decipher,
due to the large amount of text. Split these messages into individual
lines, just as in the backtrace for .include files and .for loops. This
unified backtrace makes the output more uniform.
 1.12  27-Aug-2024  rillig tests/make: add stricter checks to test for recursive variables
 1.11  27-Aug-2024  rillig make: treat recursive variables non-fatally

A recursive variable is no worse than an unknown modifier, so treat them
in the same way by continuing parsing until the end of the makefile.
 1.10  25-Aug-2024  rillig make: add more context to error message about recursive variables
 1.9  04-Jul-2024  rillig make: on error, print the targets to be made

This helps to understand situations with several nested sub-makes in
varying directories.
 1.8  04-Jul-2024  rillig make: add more context information to error messages

In case of a parse error or evaluation error, print the variable value
in addition to the variable name, to see the effects of previous
expression modifiers.

In nested make calls, print the current directory at the bottom of a
stack trace, as that information is otherwise hard to get in a parallel
build spanning multiple directories.
 1.7  07-Jan-2024  sjg branches: 1.7.2;
make: more consistent error messages

Move %s: progname from Job_CheckCommands to Fatal
to avoid is being repeated when Job_CheckCommands is passed Error.

This means some errors from var also report progname (and level)
which is useful.

Reviewed by: rillig
 1.6  01-Jun-2023  rillig tests/make: force line-based diagnostics to be listed in the tests

This way, contradictions between the intended output and the actual
output are closer together and have a better chance of being spotted.
 1.5  29-Jan-2022  rillig make: for recursive variables in commands, print location

Print the approximate location based on the last command that has been
defined for the target. It would be possible to get more detailed
location information by counting the number of commands of the target,
but that would get messy due to .USEBEFORE, .USE and .DEFAULT, and
still, this is an edge case, so don't waste too much code for it now.
Having this hint about the location is more helpful than just a plain
"Variable X is recursive" without any further details.
 1.4  29-Jan-2022  rillig tests/make: demonstrate recursive variable in target
 1.3  29-Jan-2022  rillig make: print stack trace on fatal errors

The only fatal error that occurs while the makefiles are read in is the
one about recursive variables, which didn't give any hint about the
location before.

If a recursive variable is detected while evaluating the commands of a
target to be made, there is no location information, as before.
 1.2  31-Oct-2020  rillig make(1): add test for recursion detection with short variable names
 1.1  31-Oct-2020  rillig make(1): add test for recursive variable expressions
 1.7.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed