Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ordering of script argument interpolation #112

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

omnibs
Copy link
Member

@omnibs omnibs commented Jun 3, 2024

I wrote a foldl that builds up a list of keys and literals for nri-redis' script quasi quote, and forgot to unrevert the lists 🤦

This PR fixes it.

Copy link

linear bot commented Jun 3, 2024

@omnibs omnibs marked this pull request as ready for review June 3, 2024 21:37
@omnibs omnibs requested a review from micahhahn June 3, 2024 21:37
Copy link
Member

@micahhahn micahhahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😬

You know what, I swear I thought about this myself when reviewing the last PR and somehow convinced myself that it was working.

FWIW, I usually would use names like revKeys or revArguments for these kinds of folds to remind myself to reverse at the end. I've also had thoughts about making a separate RevList type that you can only concat to and would reverse on converting to a List.

@omnibs
Copy link
Member Author

omnibs commented Jun 3, 2024

I've also had thoughts about making a separate RevList type that you can only concat to and would reverse on converting to a List.

Omg. Brilliant.

@omnibs omnibs merged commit 733ee55 into trunk Jun 3, 2024
6 checks passed
@omnibs omnibs deleted the phx-1626-fix-eval-argument-ordering branch June 3, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants