History log of /src/usr.bin/make/unit-tests/varmod-indirect.mk |
Revision | | Date | Author | Comments |
1.24 |
| 30-Mar-2025 |
rillig | make: if there is an error in the items of a .for loop, don't iterate
|
1.23 |
| 29-Mar-2025 |
rillig | make: add ":" to error message about unknown modifier
In the manual page, the modifiers are listed with a preceding ":", so use the same pattern in the error message. This removes an inconsistency between the error messages "Unknown modifier" and "Bad modifier".
|
1.22 |
| 29-Mar-2025 |
rillig | make: stop parsing after seeing an unknown modifier in an expression
Previously, after an expression such as ${VAR:Z::::}, make detected the unknown modifier ":Z" and then continued parsing, which produced unnecessary follow-up error messages. It was also necessary to distinguish the error cases when logging the result of an applied modifier in -dv mode.
Unify the error handling cases of a syntax error, an evaluation error and an unknown modifier, to avoid the unnecessary follow-up error messages.
The test in varmod-edge.mk now produces ":}" from the erroneous expression, which may be misleading and thus will be looked at in a follow-up commit.
The general idea of this patch was reviewed by sjg, I made a few nonsubstantial changes after the review.
|
1.21 |
| 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.20 |
| 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.19 |
| 20-Apr-2024 |
rillig | make: provide more context information for parse/evaluate errors
|
1.18 |
| 04-Feb-2024 |
rillig | make: do not evaluate indirect modifiers in parse-only mode
Discovered by sjg.
|
1.17 |
| 04-Feb-2024 |
rillig | make: in parse-only mode, don't evaluate modifiers
Previously, the ':S', ':ts', ':tA' and ':from=to' modifiers were evaluated in parse-only mode, unnecessarily. This is only noticeable when an indirect modifier is evaluated in parse-only mode, which is another bug that will be fixed in a follow-up commit.
|
1.16 |
| 04-Feb-2024 |
rillig | tests/make: extend test for wrong evaluation in parse-only mode
|
1.15 |
| 04-Feb-2024 |
rillig | tests/make: indirect modifiers are evaluated in parse-only mode
Found by sjg@.
|
1.14 |
| 19-Nov-2023 |
rillig | tests/make: replace 'variable expressions' with 'expressions'
|
1.13 |
| 19-Nov-2023 |
rillig | tests/make: replace 'variable expression' with 'expression'
Each expression is based on a variable, there's no need for the verbosity. The wording in make's diagnostics will be changed in a follow-up commit.
|
1.12 |
| 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.11 |
| 15-Jan-2022 |
rillig | tests/make: ensure that the 'expect' comments in tests are correct
Based on tests/usr.bin/xlint/check-expect.lua.
For now, this extra check needs to be run manually.
|
1.10 |
| 08-Jan-2022 |
rillig | make: fix reported line numbers of continuation lines (since 2002)
Previously, multi-line directives like '.info' or '.error' reported the line number of their last line instead of their first line, which is more usual. This also affected the debug log from '-dp'.
|
1.9 |
| 15-Mar-2021 |
rillig | make: rename ApplyModifiersState to ModChain
The new name accurately describes the structural element that holds such properties as the separator character and whether the expression value is considered a single word. The old name ApplyModifiersState was too long and was meant as a placeholder anyway, when I introduced it in var.c 1.236 from 2020-07-03.
|
1.8 |
| 14-Feb-2021 |
rillig | make: add test for indirect ':U' modifier
Unlike ':ts' and ':tW', the effects of ':U' are visible even after the modifiers from the nested expression have been applied. These subtle details, like many others, are not documented in the manual page.
|
1.7 |
| 14-Feb-2021 |
rillig | make: document since when indirect modifiers are supported
|
1.6 |
| 14-Feb-2021 |
rillig | make: add more tests for edge cases in evaluating variable expressions
As a preparation for refactoring the code around variable expressions, there need to be a few tests for indirect variable modifiers since these were not covered before.
Indirect modifiers may include ':ts' and ':tW', which change the interpretation of the variable expression in small details. The scope of these changes is limited to the indirect modifier, any evaluations outside this indirect modifier are unaffected.
The changes to the .exp file are mostly line number changes, plus a demonstration of a newly found bug, where an expression is evaluated successfully despite producing a parse error.
|
1.5 |
| 27-Dec-2020 |
rillig | make(1): split test for indirect modifiers into paragraphs
|
1.4 |
| 27-Dec-2020 |
rillig | make(1): add tests for parsing indirect modifiers in nested expressions
|
1.3 |
| 27-Dec-2020 |
rillig | make(1): remove dead code from ApplyModifiersIndirect
At that point, the expression can never be varUndefined. At the beginning of ParseVarnameLong, the expression is initialized to a simple empty string, and that string is only ever converted to varUndefined at the very end of Var_Parse.
|
1.2 |
| 20-Dec-2020 |
rillig | make(1): move tests for indirect modifiers around
The next commit will error out on unknown modifiers and influence the exit status. The test modmisc.mk contains both parse time tests and run time tests. To prevent the latter from being run, the parse error is moved to varmod-indirect.mk, which only contains parse time tests.
|
1.1 |
| 01-Dec-2020 |
rillig | make(1): add test and tutorial for indirect modifiers
|