-
Notifications
You must be signed in to change notification settings - Fork 425
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
Error trying to read map from file #20004
Comments
I hate to be a pessimist, but I feel as though I would not be surprised if read() on most of the collection types in the standard library had similar issues (?). |
I think there's a good chance of that. In going through some of the recent IO work I noticed a number of expressions like "<~> '['", where were implementing a 'readWriteThis'. Such expressions will fail to compile (passing const to ref), and so I suspect we were never resolving a path where the type was read. I've added some compiler warnings to the cases I noticed over in #19983 |
Yeah, I definitely believe we've been very optimistic sometimes about thinking "I'll use |
Checking back in on this, it appears that the core issue is that Map's The new serialization effort handles this by clearing the map at the beginning of a read, and using the new API to add as many key-value pairs as there are in the fileReader's stream. Once serializers are enabled, I will be able to close this issue. |
This is resolved by #23207, which enabled serializers by default. |
Summary of Problem
I was updating the reading and writing implementation of various things, and observed this error while trying to confirm something unrelated. In the sample test below we print a map to a file and try to read it back in, but encounter a formatting error involving the ending curly-brace.
Steps to Reproduce
Source Code:
This program fails with the following message when attempting to read the map back in:
Associated Future Test(s):
test/library/standard/Map/testMapIO.chpl
#19983The text was updated successfully, but these errors were encountered: