Skip to content

Conversation

@dividedmind
Copy link
Collaborator

Lambda argument captures used to use generic (...args) capture which could shadow locals named 'args' in instrumented code closures. This lead to unexpected behaviour when the code tried accessing its own 'args' but ended up accessing AppMap's argument capture instead.

Changing to a collision-resistant name ($appmap$args) avoids this issue.

Fixes #161

Lambda argument captures used to use generic (...args) capture which
could shadow locals named 'args' in instrumented code closures.
This lead to unexpected behaviour when the code tried accessing its
own 'args' but ended up accessing AppMap's argument capture instead.

Changing to a collision-resistant name ($appmap$args) avoids this issue.

Fixes #161
@dividedmind dividedmind requested a review from dustinbyrne August 1, 2024 11:11
@dividedmind dividedmind self-assigned this Aug 1, 2024
@dustinbyrne dustinbyrne merged commit 05af269 into main Aug 2, 2024
@dustinbyrne dustinbyrne deleted the fix/args-local-shadowing branch August 2, 2024 17:12
@appland-release
Copy link

🎉 This PR is included in version 2.23.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

4 participants