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

lib: limit number of entries shown by as_string for non-finite Sequences #2528

Merged

Conversation

fridis
Copy link
Member

@fridis fridis commented Feb 8, 2024

This results in useful output as in

  > echo "say [1,2,3].cycle" | ./build/bin/fz -
  [1,2,3,1,2,3,1,2,3,1,…]

Instead of crashing with an out of memory or stack overflow error.

Compared to #2520, this does not cause repeated evaluation of list elements and it also updated error output of one test.

… output

Repeated evaluation broke tests/lazy.

tests/partial_application_negative requires updated error output due to change
line numbers.
Except for #2527, this is shorteer and nicer.
@michaellilltokiwa michaellilltokiwa merged commit a4f43af into main Feb 9, 2024
5 checks passed
@michaellilltokiwa michaellilltokiwa deleted the do_not_create_infinite_String_from_infinite_sequence branch February 9, 2024 08:32
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.

None yet

2 participants