{"action":"opened","issue":{"url":"https://api.github.com/repos/waf-project/waf/issues/1766","repository_url":"https://api.github.com/repos/waf-project/waf","labels_url":"https://api.github.com/repos/waf-project/waf/issues/1766/labels{/name}","comments_url":"https://api.github.com/repos/waf-project/waf/issues/1766/comments","events_url":"https://api.github.com/repos/waf-project/waf/issues/1766/events","html_url":"https://github.com/waf-project/waf/issues/1766","id":164209436,"number":1766,"title":"Issue with `A compiler producing source files with names unknown in advance` example in the waf book?","user":{"login":"bradtgmurray","id":33967,"avatar_url":"https://avatars.githubusercontent.com/u/33967?v=3","gravatar_id":"","url":"https://api.github.com/users/bradtgmurray","html_url":"https://github.com/bradtgmurray","followers_url":"https://api.github.com/users/bradtgmurray/followers","following_url":"https://api.github.com/users/bradtgmurray/following{/other_user}","gists_url":"https://api.github.com/users/bradtgmurray/gists{/gist_id}","starred_url":"https://api.github.com/users/bradtgmurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradtgmurray/subscriptions","organizations_url":"https://api.github.com/users/bradtgmurray/orgs","repos_url":"https://api.github.com/users/bradtgmurray/repos","events_url":"https://api.github.com/users/bradtgmurray/events{/privacy}","received_events_url":"https://api.github.com/users/bradtgmurray/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-07T01:18:50Z","updated_at":"2016-07-07T01:18:50Z","closed_at":null,"body":"We recently integrated protobuf compilation into our waf build which follows the pattern of a build task that doesn't know the name of it's outputs in advance. We found section `11.4.2. A compiler producing source files with names unknown in advance` in the waf book and pretty much used that sample code verbatim. However, rarely we'll end up with a failed build that looks something like the following.\r\n\r\n```Traceback (most recent call last):\r\n  File \"/root/bamboo-agent-home/xml-data/build-dir/TT-MC10-BSPBQ/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Task.py\", line 110, in process\r\n    ret=self.run()\r\n  File \"/root/bamboo-agent-home/xml-data/build-dir/TT-MC10-BSPBQ/waftools/protoc.py\", line 55, in run\r\n    tsk.add_c_tasks(tsk.outputs)\r\n  File \"/root/bamboo-agent-home/xml-data/build-dir/TT-MC10-BSPBQ/waftools/protoc.py\", line 70, in add_c_tasks\r\n    tsk.generator.link_task.inputs.sort(key=lambda x: x.abspath())\r\nValueError: list modified during sort```\r\n```\r\n\r\nRelevant line in the waf book is here: https://github.com/waf-project/waf/blob/b78ba7d72cede612eff939db065a6ba68b067975/docs/book/scenarios.txt#L645\r\n\r\nIs it possible for two threads to call `run` and `runnable_status` on tasks that have the same `.link_task` concurrently? If so, should this example be updated to account for that?"}}
{"actor":{"display_login":"bradtgmurray"}}