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

improve membrane.component/parse-path to avoid instances of shadowing and multiple evaluation #59

Open
phronmophobic opened this issue Sep 30, 2022 · 0 comments

Comments

@phronmophobic
Copy link
Owner

Parse path will update the "path" for a binding using something like the following:

         (clojure.core/nth nth)
         [(second form)
          `(list (quote ~'nth) ~(nth form 2))]

This generally works, but there are some subtle issues with the value of ~(nth form 2) being potentially evaluated multiple times, shadowed, and/or producing different values when the $ref is used.

A potential fix would be to just insert a new binding for the index. However, that might add a lot of code bloat, especially since most bindings will never be referenced.

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

No branches or pull requests

1 participant