{"action":"created","issue":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/3893","repository_url":"https://api.github.com/repos/chapel-lang/chapel","labels_url":"https://api.github.com/repos/chapel-lang/chapel/issues/3893/labels{/name}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/3893/comments","events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/3893/events","html_url":"https://github.com/chapel-lang/chapel/pull/3893","id":155612237,"number":3893,"title":"Remove record chpl_main_argument for --minimal-modules","user":{"login":"vasslitvinov","id":8039635,"avatar_url":"https://avatars.githubusercontent.com/u/8039635?v=3","gravatar_id":"","url":"https://api.github.com/users/vasslitvinov","html_url":"https://github.com/vasslitvinov","followers_url":"https://api.github.com/users/vasslitvinov/followers","following_url":"https://api.github.com/users/vasslitvinov/following{/other_user}","gists_url":"https://api.github.com/users/vasslitvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/vasslitvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasslitvinov/subscriptions","organizations_url":"https://api.github.com/users/vasslitvinov/orgs","repos_url":"https://api.github.com/users/vasslitvinov/repos","events_url":"https://api.github.com/users/vasslitvinov/events{/privacy}","received_events_url":"https://api.github.com/users/vasslitvinov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-18T22:03:51Z","updated_at":"2016-05-19T20:34:18Z","closed_at":"2016-05-19T20:34:18Z","pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/3893","html_url":"https://github.com/chapel-lang/chapel/pull/3893","diff_url":"https://github.com/chapel-lang/chapel/pull/3893.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/3893.patch"},"body":"This change makes minimal modules more minimal.\r\n\r\nIt was easy to have the compiler accomodate the absence of declaration\r\nof chpl_main_argument - see the change in buildDefaultFunctions.cpp.\r\n\r\nAs a result, the generated C code defines chpl_gen_main() taking no arguments.\r\nWhich contradicts the prototype of chpl_gen_main() in the runtime.\r\nTo match that prototype, we create record chpl_main_argument\r\nand add an appropriate argument to chpl_gen_main() right before codegen."},"comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/220444053","html_url":"https://github.com/chapel-lang/chapel/pull/3893#issuecomment-220444053","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/3893","id":220444053,"user":{"login":"vasslitvinov","id":8039635,"avatar_url":"https://avatars.githubusercontent.com/u/8039635?v=3","gravatar_id":"","url":"https://api.github.com/users/vasslitvinov","html_url":"https://github.com/vasslitvinov","followers_url":"https://api.github.com/users/vasslitvinov/followers","following_url":"https://api.github.com/users/vasslitvinov/following{/other_user}","gists_url":"https://api.github.com/users/vasslitvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/vasslitvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasslitvinov/subscriptions","organizations_url":"https://api.github.com/users/vasslitvinov/orgs","repos_url":"https://api.github.com/users/vasslitvinov/repos","events_url":"https://api.github.com/users/vasslitvinov/events{/privacy}","received_events_url":"https://api.github.com/users/vasslitvinov/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T20:34:18Z","updated_at":"2016-05-19T20:34:18Z","body":"@bradcray also suggests optimizing for compiler simplicity.\r\n\r\nEven with minimal modules, chpl_main_argument is off to the side and is expected to stay out of the way of debugging. So it is not important to get rid of it.\r\n\r\nClosing this."}}