View Issue Details

IDProjectCategoryView StatusLast Update
0001710Issue 8 draftsShell and Utilitiespublic2024-06-11 09:12
Reporterrillig Assigned To 
PrioritynormalSeverityEditorialTypeOmission
Status ClosedResolutionAccepted As Marked 
Product VersionDraft 3 
NameRoland Illig
Organization
User Reference
Sectionmake
Page Number3113
Line Number104930
Final Accepted Text0001710:0006364
Summary0001710: Evaluate delayed-expansion macros in '!=' macro definition
DescriptionLine 104930 lists the situations in which delayed-expansion macros are expanded. It is missing the right-hand side of a '!=' macro definition, as well as the right-hand side of a '+=' macro definition with an immediate-expansion macro on the left-hand side.
Desired ActionAdd the missing cases explicitly, or come up with a concise definition for all situations in which delayed-expansion macros have to be expanded.
Tagsapplied_after_i8d3, issue8

Activities

rillig

2023-05-07 14:03

reporter   bugnote:0006274

Same topic, different line: In line 104933, after the words ':::= operator', insert 'or the += operator on an immediate-expansion macro'.

geoffclare

2023-06-26 16:22

manager   bugnote:0006357

On page 3113 line 104928 change:
Delayed-expansion macros after the <equals-sign> in a macro definition shall not be evaluated until the defined macro is used in a rule or command, or before the <equals-sign> in a macro definition.
to:
Delayed-expansion macros after the <equals-sign> in macro definitions other than the :::=, !=, and += forms, and after the <equals-sign> in += form macro definitions where the macro named by string1 exists and is a delayed-expansion macro, shall not be evaluated until the defined macro is used in any of the following ways:
  • in a rule or command

  • before the <equals-sign> in a macro definition

  • after the <equals-sign> in a :::= or != form macro definition

  • after the <equals-sign> in a += form macro definition where the macro named by string1 exists and is an immediate-expansion macro.

geoffclare

2023-06-26 16:27

manager   bugnote:0006358

Regarding the suggestion in 0001710:0006274, the special handling of "$$" is only applicable to :::= as it is the only one where double evaluation would happen otherwise.

rillig

2023-06-26 16:59

reporter   bugnote:0006359

Last edited: 2023-06-26 17:01

Regarding Note 0006357, the new text contains a double negation in the form of "other than … shall not be evaluated", which may be unnecessarily hard to understand, and it contains redundant content. Did you consider rewording the text to:

Delayed-expansion macros after the <equals-sign> in macro definitions shall only be expanded during the macro definition if: […]


Aren't all these details already covered by the sentence starting in line 104914? Maybe they don't need to be listed at all.

geoffclare

2023-06-27 09:16

manager   bugnote:0006362

> Did you consider rewording the text

No, we didn't. We just took the existing structure and updated it to fix the conflicts with other parts of the text.

> Aren't all these details already covered by the sentence starting in line 104914?

Given that what we changed was done in order to resolve conflicts with other text, I suppose that does mean that the other text in question already covers it. (That's not just line 104914, but that line in combination with other parts.) So maybe it would work if we just change the text to:
Delayed-expansion macros after the <equals-sign> in macro definitions other than the :::=, !=, and += forms, and after the <equals-sign> in += form macro definitions where the macro named by string1 exists and is a delayed-expansion macro, shall only be evaluated when the defined macro is expanded.

geoffclare

2023-06-27 09:24

manager   bugnote:0006363

Reopening so that we can consider changing to a resolution that doesn't repeat a lot of detail (with the consequent danger that it could get out of step in future).

geoffclare

2023-06-27 09:26

manager   bugnote:0006364

Proposed new resolution ...

On page 3113 line 104928 change:
Delayed-expansion macros after the <equals-sign> in a macro definition shall not be evaluated until the defined macro is used in a rule or command, or before the <equals-sign> in a macro definition.
to:
Delayed-expansion macros after the <equals-sign> in macro definitions other than the :::=, !=, and += forms, and after the <equals-sign> in += form macro definitions where the macro named by string1 exists and is a delayed-expansion macro, shall only be evaluated when the defined macro is expanded.

Issue History

Date Modified Username Field Change
2023-05-07 14:00 rillig New Issue
2023-05-07 14:00 rillig Name => Roland Illig
2023-05-07 14:00 rillig Section => make
2023-05-07 14:00 rillig Page Number => 3113
2023-05-07 14:00 rillig Line Number => 104930
2023-05-07 14:03 rillig Note Added: 0006274
2023-06-26 16:22 geoffclare Note Added: 0006357
2023-06-26 16:24 geoffclare Final Accepted Text => 0001710:0006357
2023-06-26 16:24 geoffclare Status New => Resolved
2023-06-26 16:24 geoffclare Resolution Open => Accepted As Marked
2023-06-26 16:24 geoffclare Tag Attached: issue8
2023-06-26 16:27 geoffclare Note Added: 0006358
2023-06-26 16:59 rillig Note Added: 0006359
2023-06-26 17:01 rillig Note Edited: 0006359
2023-06-27 09:16 geoffclare Note Added: 0006362
2023-06-27 09:24 geoffclare Note Added: 0006363
2023-06-27 09:24 geoffclare Status Resolved => Under Review
2023-06-27 09:24 geoffclare Resolution Accepted As Marked => Reopened
2023-06-27 09:26 geoffclare Note Added: 0006364
2023-06-29 15:07 geoffclare Final Accepted Text 0001710:0006357 => 0001710:0006364
2023-06-29 15:07 geoffclare Status Under Review => Resolved
2023-06-29 15:07 geoffclare Resolution Reopened => Accepted As Marked
2023-07-18 10:57 geoffclare Status Resolved => Applied
2023-07-18 10:57 geoffclare Tag Attached: applied_after_i8d3
2024-06-11 09:12 agadmin Status Applied => Closed