{"action":"created","issue":{"url":"https://api.github.com/repos/gnuradio/gnuradio/issues/1318","repository_url":"https://api.github.com/repos/gnuradio/gnuradio","labels_url":"https://api.github.com/repos/gnuradio/gnuradio/issues/1318/labels{/name}","comments_url":"https://api.github.com/repos/gnuradio/gnuradio/issues/1318/comments","events_url":"https://api.github.com/repos/gnuradio/gnuradio/issues/1318/events","html_url":"https://github.com/gnuradio/gnuradio/issues/1318","id":232707700,"number":1318,"title":"gr_modtool created OOT modules don't track dependencies correctly for swig ","user":{"login":"pwicks86","id":56168,"avatar_url":"https://avatars1.githubusercontent.com/u/56168?v=3","gravatar_id":"","url":"https://api.github.com/users/pwicks86","html_url":"https://github.com/pwicks86","followers_url":"https://api.github.com/users/pwicks86/followers","following_url":"https://api.github.com/users/pwicks86/following{/other_user}","gists_url":"https://api.github.com/users/pwicks86/gists{/gist_id}","starred_url":"https://api.github.com/users/pwicks86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwicks86/subscriptions","organizations_url":"https://api.github.com/users/pwicks86/orgs","repos_url":"https://api.github.com/users/pwicks86/repos","events_url":"https://api.github.com/users/pwicks86/events{/privacy}","received_events_url":"https://api.github.com/users/pwicks86/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-31T21:51:53Z","updated_at":"2017-05-31T23:38:00Z","closed_at":null,"body":"To reproduce:\r\n\r\n1. Create an oot module (gr_foo say)\r\n1. Create a new C++ block via gr_modtool (bar for example)\r\n2. Build\r\n3. Change the C++ definition (in lib/bar_impl.* and include/foo/bar.h``) to add a new function to the block\r\n4. Build\r\n5. Observe that the foomod_swigPYTHON_wrap.cxx hasn't been updated to reflect the new function (alternately, if you remove a function from the block, you'll get a compile error)\r\n\r\nThe easy fix is to just `make clean` and rebuild, but it seems like cmake should be able to do better. \r\n\r\nI've got a local patch for this that basically just adds something like this to the CMakeLists.txt for the swig directory:\r\n\r\n```\r\nforeach(foomod_source_file ${foomod_sources})\r\n    if(IS_ABSOLUTE skysafe_source_file)\r\n        list(APPEND GR_SWIG_SOURCE_DEPS ${foomod_source_file})\r\n    else()\r\n        list(APPEND GR_SWIG_SOURCE_DEPS ${CMAKE_SOURCE_DIR}/lib/${foomod_source_file})\r\n    endif()\r\nendforeach()\r\n```\r\n\r\nI'm willing to submit a PR for that, but it seems like maybe that's not the best way to handle this, since it won't work in the case of changes that are confined to just the impl header files."},"comment":{"url":"https://api.github.com/repos/gnuradio/gnuradio/issues/comments/305348159","html_url":"https://github.com/gnuradio/gnuradio/issues/1318#issuecomment-305348159","issue_url":"https://api.github.com/repos/gnuradio/gnuradio/issues/1318","id":305348159,"user":{"login":"pwicks86","id":56168,"avatar_url":"https://avatars1.githubusercontent.com/u/56168?v=3","gravatar_id":"","url":"https://api.github.com/users/pwicks86","html_url":"https://github.com/pwicks86","followers_url":"https://api.github.com/users/pwicks86/followers","following_url":"https://api.github.com/users/pwicks86/following{/other_user}","gists_url":"https://api.github.com/users/pwicks86/gists{/gist_id}","starred_url":"https://api.github.com/users/pwicks86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwicks86/subscriptions","organizations_url":"https://api.github.com/users/pwicks86/orgs","repos_url":"https://api.github.com/users/pwicks86/repos","events_url":"https://api.github.com/users/pwicks86/events{/privacy}","received_events_url":"https://api.github.com/users/pwicks86/received_events","type":"User","site_admin":false},"created_at":"2017-05-31T23:38:00Z","updated_at":"2017-05-31T23:38:00Z","body":"Created #1320 for this."}}
{"actor":{"display_login":"pwicks86"}}