Skip to content

Conversation

cwisniew
Copy link
Member

@cwisniew cwisniew commented Jun 29, 2025

Identify the Bug or Feature request

resolves #5638

Description of the Change

The getMacroLocation() method was exposing the internal workings of how the parser tracked context, so when these changed, it caused an error with the return value in some instances. I have added a new getCallableLocation() method to the parser macro source location that exposes these values in a way compatible with getMacroLocation(), while allowing the context handling in the parser to remain hidden from macros.

Possible Drawbacks

Before the change in 1.18 getMacroLocation() would not produce consistent values for token macros. I have remedied this by returning a consistent value that matches the documented behaviour on the wiki. This may break some macros, but it's unlikely, and probably better than trying to emulate the broken behaviour for an edge case for this macro call.

Documentation Notes

Fix for bug in getMacroLocation() that was introduced with the changes to macro function call routing.

Release Notes

  • N/A Fix for regression

This change is Reviewable

@kwvanderlinde kwvanderlinde merged commit 6edfdc8 into RPTools:release-1.18 Jun 29, 2025
5 checks passed
@kwvanderlinde kwvanderlinde moved this from Todo to Merged in MapTool 1.18 Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

2 participants