Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add
find
,find_index
,has
, andreject
filters to arrays #1869Add
find
,find_index
,has
, andreject
filters to arrays #1869Changes from all commits
4b01977
1058a77
3d1e2d4
41a77c6
2186981
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how I feel about re-implementing lookup logic here. There's already a way to do that which is well-defined with
VariableLookup.parse
. It even has built-in caching to mitigate performance issues of repeated parsing. Could we use this instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reservations about parsing strings at render time in general. At the very least it will play havoc with static analysis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's continue this thread here:
#1899 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems weird to me... does this mean that:
I would have expected it to be like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be weird indeed. But I believe it's already working as expected (and
product.dafsdfasdfasdf
already returnsnil
), as this test passes:The reason we're achieving the expected behavior is that:
example1
, we're resolving that at line 985example2
, we're resolving that because in the first iterationdrop
is product and returns nil for the firstdafsdfasdfasdf
call, then in the second calldrop
is alreadynil
So, I believe we're already achieving that behavior, but please let me know if I'm missing something :)