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

chplSerializer does not output domains as expected #24123

Closed
mppf opened this issue Jan 2, 2024 · 4 comments
Closed

chplSerializer does not output domains as expected #24123

mppf opened this issue Jan 2, 2024 · 4 comments

Comments

@mppf
Copy link
Member

mppf commented Jan 2, 2024

Since ChplFormat / chplSerializer exist to emit objects in a similar manner to Chapel source code, I would expect it to emit a domain in the same format as a domain literal.

For example:

use IO;
use ChplFormat;

var D = {1..10};

stdout.withSerializer(new chplSerializer()).writeln(D);

This emits

["1..10"]

But I would expect it to emit

{1..10}

Perhaps we could apply whatever exception we are using for the default serializer for ranges also to the chplSerializer here?

@benharsh
Copy link
Member

benharsh commented Jan 2, 2024

This is an unintended side effect of #23392 , which changed some IO behavior to print out domains as lists and ranges as strings when the serializer is not the default serializer.

I'll take a look at updating the chplSerializer implementation to add an exception for ranges and domains.

@bradcray
Copy link
Member

bradcray commented Jan 2, 2024

I'm throwing the 'user issue' label on this since it sounds like @redhatturtle hit this on this Discourse thread (which may have led @mppf to post this?) and the 'bug' label since @benharsh indicated that it was an unintentional change in behavior.

@benharsh
Copy link
Member

benharsh commented Jan 4, 2024

Resolved by #24145

@benharsh benharsh closed this as completed Jan 4, 2024
@mppf
Copy link
Member Author

mppf commented Jan 5, 2024

thanks @benharsh !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants