-
Notifications
You must be signed in to change notification settings - Fork 60
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
#merge #ref fails under some circumstances. #85
Comments
Merge is a "function" not a macro, so it isn't supposed to be concerned with incomplete items. |
On mobile, bug is in (defmethod eval-tagged-literal :default [tl opts env ks] (let [{:keys [:aero.core/incomplete?] :as expansion} (expand (:form tl) opts env ks)] (if incomplete? (update expansion ::value (rewrap tl)) (update expansion ::value #(reader opts (:tag tl) %))))) |
It should probably expand repeatedly in the same way #or does |
I am having trouble reproducing this. My suspicion was that the arguments to |
Okay, finally giving up. If you redefine
It will print out some useful debugging information about the order of things tried, when/if they were marked incomplete, and what went in. tools.trace was producing way too much output because of how big env gets. The code is a little messy. Hopefully this will provide you the data to figure out a minimal repro |
Awesome. I will get back to you with my findings. |
I think I would like to close the issue because in simplifying down the config.edn this issue has been avoided. I don't think there are many actionable steps for this issue given I couldn't recreate the issue. Thoughts? |
Maybe the next person will have a clearer picture of what's going on (or maybe you weren't understanding your complex config properly? 😜). Let's close until someone figures it out. |
My convoluted configuration looks something like
When I apply aero's reader on this .edn I'll get something like
The merge bit fails. However if I alter some other piece of the map such as duplicating a key-value pair such as
Then it will properly evaluate to
This makes me suspect that some evaluation-order issue is responsible. Looking at the implementation of the #merge reader I don't see any piece for checking for incomplete contents so I'm surprised it seems to work so often.
Unfortunately I could not recreate a small example, and even anonymizing the keys and values in my personal config destroy the behavior so I cannot share that either.
The text was updated successfully, but these errors were encountered: