{"action":"created","issue":{"url":"https://api.github.com/repos/parallaxinc/OpenSpin/issues/17","labels_url":"https://api.github.com/repos/parallaxinc/OpenSpin/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/parallaxinc/OpenSpin/issues/17/comments","events_url":"https://api.github.com/repos/parallaxinc/OpenSpin/issues/17/events","html_url":"https://github.com/parallaxinc/OpenSpin/issues/17","id":63163074,"number":17,"title":"Unused method removal removes methods passed to cognew","user":{"login":"bweir","id":9509912,"avatar_url":"https://avatars.githubusercontent.com/u/9509912?v=3","gravatar_id":"","url":"https://api.github.com/users/bweir","html_url":"https://github.com/bweir","followers_url":"https://api.github.com/users/bweir/followers","following_url":"https://api.github.com/users/bweir/following{/other_user}","gists_url":"https://api.github.com/users/bweir/gists{/gist_id}","starred_url":"https://api.github.com/users/bweir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bweir/subscriptions","organizations_url":"https://api.github.com/users/bweir/orgs","repos_url":"https://api.github.com/users/bweir/repos","events_url":"https://api.github.com/users/bweir/events{/privacy}","received_events_url":"https://api.github.com/users/bweir/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/parallaxinc/OpenSpin/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"reltham","id":3689101,"avatar_url":"https://avatars.githubusercontent.com/u/3689101?v=3","gravatar_id":"","url":"https://api.github.com/users/reltham","html_url":"https://github.com/reltham","followers_url":"https://api.github.com/users/reltham/followers","following_url":"https://api.github.com/users/reltham/following{/other_user}","gists_url":"https://api.github.com/users/reltham/gists{/gist_id}","starred_url":"https://api.github.com/users/reltham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reltham/subscriptions","organizations_url":"https://api.github.com/users/reltham/orgs","repos_url":"https://api.github.com/users/reltham/repos","events_url":"https://api.github.com/users/reltham/events{/privacy}","received_events_url":"https://api.github.com/users/reltham/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-03-20T05:02:51Z","updated_at":"2015-05-13T23:13:29Z","closed_at":"2015-05-11T09:37:04Z","body":"`MusicPlayer` is a private function passed to a cognew, but is used nowhere else, so `-u` removes the function.\r\n\r\nCompiling without unused method removal:\r\n```\r\n$ ./openspin ~/Projects/lamestation-sdk/games/Brettris/Brettris.spin -L ~/Projects/lamestation-sdk/\r\nPropeller Spin/PASM Compiler 'OpenSpin' (c)2012-2015 Parallax Inc. DBA Parallax Semiconductor.\r\nVersion 1.00.72 Compiled on Mar 19 2015 21:49:36\r\nCompiling...\r\n/home/brett/Projects/lamestation-sdk/games/Brettris/Brettris.spin\r\n|-LameLCD.spin\r\n  |-Pinout.spin\r\n|-LameGFX.spin\r\n|-LameAudio.spin\r\n  |-Pinout.spin\r\n|-LameMusic.spin\r\n  |-LameAudio.spin\r\n    |-Pinout.spin\r\n|-LameControl.spin\r\n  |-Pinout.spin\r\n  |-LameFunctions.spin\r\n|-LameFunctions.spin\r\n|-gfx_bretrominos.spin\r\n|-gfx_wall.spin\r\n|-gfx_font4x6_w.spin\r\n|-gfx_scorebox.spin\r\n|-song_tetris.spin\r\n|-gfx_bretris_logo.spin\r\n|-gfx_gameover.spin\r\nDone.\r\nProgram size is 11752 bytes\r\n```\r\nWith unused method removal enabled:\r\n```\r\n$ ./openspin ~/Projects/lamestation-sdk/games/Brettris/Brettris.spin -L ~/Projects/lamestation-sdk/ -u\r\nPropeller Spin/PASM Compiler 'OpenSpin' (c)2012-2015 Parallax Inc. DBA Parallax Semiconductor.\r\nVersion 1.00.72 Compiled on Mar 19 2015 21:53:47\r\nCompiling...\r\n/home/brett/Projects/lamestation-sdk/games/Brettris/Brettris.spin\r\n|-LameLCD.spin\r\n  |-Pinout.spin\r\n|-LameGFX.spin\r\n|-LameAudio.spin\r\n  |-Pinout.spin\r\n|-LameMusic.spin\r\n  |-LameAudio.spin\r\n    |-Pinout.spin\r\n|-LameControl.spin\r\n  |-Pinout.spin\r\n  |-LameFunctions.spin\r\n|-LameFunctions.spin\r\n|-gfx_bretrominos.spin\r\n|-gfx_wall.spin\r\n|-gfx_font4x6_w.spin\r\n|-gfx_scorebox.spin\r\n|-song_tetris.spin\r\n|-gfx_bretris_logo.spin\r\n|-gfx_gameover.spin\r\nDone.\r\nNOT IMPLEMENTED\r\nNOT IMPLEMENTED\r\nNOT IMPLEMENTED\r\nNOT IMPLEMENTED\r\n|-LameLCD.spin\r\n|-LameGFX.spin\r\n|-LameAudio.spin\r\n|-LameMusic.spin\r\n  |-LameAudio.spin\r\nLameMusic.spin(48:12) : error : Expected an expression term\r\nLine:\r\n    cognew(MusicPlayer, @MusicPlayerStack)\r\nOffending Item: MusicPlayer\r\n```\r\nI'm building off a fresh checkout of parallaxinc/OpenSpin.\r\n\r\nI did try a few projects that didn't use this feature and it reduced the binary size significantly, so it's looking good so far. :)"},"comment":{"url":"https://api.github.com/repos/parallaxinc/OpenSpin/issues/comments/101845423","html_url":"https://github.com/parallaxinc/OpenSpin/issues/17#issuecomment-101845423","issue_url":"https://api.github.com/repos/parallaxinc/OpenSpin/issues/17","id":101845423,"user":{"login":"reltham","id":3689101,"avatar_url":"https://avatars.githubusercontent.com/u/3689101?v=3","gravatar_id":"","url":"https://api.github.com/users/reltham","html_url":"https://github.com/reltham","followers_url":"https://api.github.com/users/reltham/followers","following_url":"https://api.github.com/users/reltham/following{/other_user}","gists_url":"https://api.github.com/users/reltham/gists{/gist_id}","starred_url":"https://api.github.com/users/reltham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reltham/subscriptions","organizations_url":"https://api.github.com/users/reltham/orgs","repos_url":"https://api.github.com/users/reltham/repos","events_url":"https://api.github.com/users/reltham/events{/privacy}","received_events_url":"https://api.github.com/users/reltham/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T23:13:29Z","updated_at":"2015-05-13T23:13:29Z","body":"Ok, it looks like there is still an issue with the indexing.  I'll try to get this fixed ASAP."}}