{"action":"created","issue":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/2741","labels_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2741/labels{/name}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2741/comments","events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2741/events","html_url":"https://github.com/chapel-lang/chapel/pull/2741","id":110053143,"number":2741,"title":"Adjust fielderator and I/O for type and param fields","user":{"login":"mppf","id":3653132,"avatar_url":"https://avatars.githubusercontent.com/u/3653132?v=3","gravatar_id":"","url":"https://api.github.com/users/mppf","html_url":"https://github.com/mppf","followers_url":"https://api.github.com/users/mppf/followers","following_url":"https://api.github.com/users/mppf/following{/other_user}","gists_url":"https://api.github.com/users/mppf/gists{/gist_id}","starred_url":"https://api.github.com/users/mppf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mppf/subscriptions","organizations_url":"https://api.github.com/users/mppf/orgs","repos_url":"https://api.github.com/users/mppf/repos","events_url":"https://api.github.com/users/mppf/events{/privacy}","received_events_url":"https://api.github.com/users/mppf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bradcray","id":7536222,"avatar_url":"https://avatars.githubusercontent.com/u/7536222?v=3","gravatar_id":"","url":"https://api.github.com/users/bradcray","html_url":"https://github.com/bradcray","followers_url":"https://api.github.com/users/bradcray/followers","following_url":"https://api.github.com/users/bradcray/following{/other_user}","gists_url":"https://api.github.com/users/bradcray/gists{/gist_id}","starred_url":"https://api.github.com/users/bradcray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradcray/subscriptions","organizations_url":"https://api.github.com/users/bradcray/orgs","repos_url":"https://api.github.com/users/bradcray/repos","events_url":"https://api.github.com/users/bradcray/events{/privacy}","received_events_url":"https://api.github.com/users/bradcray/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-10-06T16:57:12Z","updated_at":"2016-01-06T16:26:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/2741","html_url":"https://github.com/chapel-lang/chapel/pull/2741","diff_url":"https://github.com/chapel-lang/chapel/pull/2741.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/2741.patch"},"body":"The fielderator was ignoring type fields but not param fields.\r\nAt the same time, the default I/O implementation was writing\r\nparam fields but not type fields.\r\n\r\nBased on discussions with Brad, we think that\r\n * the fielderator should iterate through type and param fields.\r\n * the default writeln behavior should not print out param fields\r\n   or type fields.\r\n\r\nThe thinking is that param fields should have the same treatment as type\r\nfields, since they are both compile-time. In addition, it probably does\r\nnot make sense - from the perspective of reading back in output produced\r\nearlier - for I/O to write/read param or type fields by default.\r\n\r\nIn order to make these changes, I needed to:\r\n * modify isNormalField, which is used by the fielderator, to\r\n   enumerate type fields, to stop skipping type fields.\r\n * tweak postFold in functionResolution to allow isType() to apply\r\n   to the result of the fielderator's get field value function.\r\n * in ChapelIO.chpl, use isType and isParam to omit type or\r\n   param fields from the default generated I/O\r\n * update many tests to either explicitly print out param fields,\r\n   or update their .good files to not expect the output of the\r\n   param field.\r\n\r\nPassed full local testing."},"comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/169378984","html_url":"https://github.com/chapel-lang/chapel/pull/2741#issuecomment-169378984","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2741","id":169378984,"user":{"login":"mppf","id":3653132,"avatar_url":"https://avatars.githubusercontent.com/u/3653132?v=3","gravatar_id":"","url":"https://api.github.com/users/mppf","html_url":"https://github.com/mppf","followers_url":"https://api.github.com/users/mppf/followers","following_url":"https://api.github.com/users/mppf/following{/other_user}","gists_url":"https://api.github.com/users/mppf/gists{/gist_id}","starred_url":"https://api.github.com/users/mppf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mppf/subscriptions","organizations_url":"https://api.github.com/users/mppf/orgs","repos_url":"https://api.github.com/users/mppf/repos","events_url":"https://api.github.com/users/mppf/events{/privacy}","received_events_url":"https://api.github.com/users/mppf/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T16:26:38Z","updated_at":"2016-01-06T16:26:38Z","body":"Do you think that writeln(R) should print type fields in R?\r\n\r\nMore than anything else... I want the language to use the same strategy for 'param' and 'type' fields in a record. I'd be open to printing out both of those, although it will give me some pause because it's not so meaningful to read in a type that was printed out (and generally speaking I want our default-formatted output to be able to be read back in).\r\n\r\nAnother issue of course is that sometimes right now the compiler's names for types don't match the user's names for them (e.g. with arrays)."}}