-
Notifications
You must be signed in to change notification settings - Fork 2
Don't restrict bind scope to the bound var #83
Conversation
Catmandu only does this when the Options:
My preference would be 2. |
I don't get that. What's the point in not making the record available, in particular if we bind nothing to a var? Could that be a bug in Catmandu? In general, I'd like to focus on getting our use cases working, and not worry too much about Catmandu compatibility at this point, therefore I'd vote for 1:
|
That was the initial implementation, so there must have been some point to it ;)
Then your scope is determined by the path, you just can't access the whole record. If you need that, bind to a variable.
As I said, I don't know if it's documented anywhere. But it was introduced as a feature enhancement (LibreCat/Catmandu@88dd6d1), the restricted scope was the original behaviour, AFAICS. |
metafix/src/main/java/org/metafacture/metafix/RecordTransformer.java
Outdated
Show resolved
Hide resolved
metafix/src/main/java/org/metafacture/metafix/RecordTransformer.java
Outdated
Show resolved
Hide resolved
Oh, that was fast. Here's what I wrote but waited to send after the build was fixed: I've added access to the bound values to understand Catmandu's behavior in hbz/Catmandu@093c6cb and added corresponding tests and implementation in 1b1ee8e. I'll commit further tweaks based on your comments. |
Co-authored-by: Jens Wille <[email protected]>
Thanks for the quick review, I think your points should be addressed in a70a7b8. I will merge once all conversations are resolved. |
Great, thanks! I think everything's resolved now. |
Will resolve #66