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

REPL: Output format change for list(string) #656

Closed
l46kok opened this issue Mar 10, 2023 · 1 comment
Closed

REPL: Output format change for list(string) #656

l46kok opened this issue Mar 10, 2023 · 1 comment

Comments

@l46kok
Copy link
Collaborator

l46kok commented Mar 10, 2023

Describe the bug
In REPL, it's currently not possible to distinguish whether an outputted list of strings are multiple elements in a list or the string itself contains a space:

cel-repl> ["Hello World"]
[Hello World] : list(string)
cel-repl> ["Hello","World"]
[Hello World] : list(string)

Expected behavior

We could simply wrap the elements of string type with quotes and optionally use comma as a separator:

cel-repl> ["Hello World"]
["Hello World"] : list(string)
cel-repl> ["Hello","World"]
["Hello", "World"] : list(string)
@TristonianJones
Copy link
Collaborator

@l46kok if you want to update the Stringer implementation for list and map types, this would probably be worthwhile and address the issue you're seeing in the repl.

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

2 participants