{"action":"opened","issue":{"url":"https://api.github.com/repos/PRL-PRG/scalafix-rule-workshop/issues/77","repository_url":"https://api.github.com/repos/PRL-PRG/scalafix-rule-workshop","labels_url":"https://api.github.com/repos/PRL-PRG/scalafix-rule-workshop/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/PRL-PRG/scalafix-rule-workshop/issues/77/comments","events_url":"https://api.github.com/repos/PRL-PRG/scalafix-rule-workshop/issues/77/events","html_url":"https://github.com/PRL-PRG/scalafix-rule-workshop/issues/77","id":309970937,"number":77,"title":"Our scalameta plugin doesn't capture all the sources","user":{"login":"blorente","id":5861182,"avatar_url":"https://avatars0.githubusercontent.com/u/5861182?v=4","gravatar_id":"","url":"https://api.github.com/users/blorente","html_url":"https://github.com/blorente","followers_url":"https://api.github.com/users/blorente/followers","following_url":"https://api.github.com/users/blorente/following{/other_user}","gists_url":"https://api.github.com/users/blorente/gists{/gist_id}","starred_url":"https://api.github.com/users/blorente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blorente/subscriptions","organizations_url":"https://api.github.com/users/blorente/orgs","repos_url":"https://api.github.com/users/blorente/repos","events_url":"https://api.github.com/users/blorente/events{/privacy}","received_events_url":"https://api.github.com/users/blorente/received_events","type":"User","site_admin":false},"labels":[{"id":712287658,"url":"https://api.github.com/repos/PRL-PRG/scalafix-rule-workshop/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-30T04:13:13Z","updated_at":"2018-03-30T04:13:13Z","closed_at":null,"author_association":"MEMBER","body":"When executing semanticdb, we can see that there are some managed sources that do get compiled (registered into `sbt`), but do not generate semanticdb files. Here is an example:\r\n\r\n## Sources\r\n```\r\nborja@xmi ~/work/scala/tmp/ScalaByExample $ sbt \"show sources\" | awk -F\"\\\\\\\\(|, |\\\\\\\\)|\\\\\\\\* \" ' /(\\(\\/|\\*)/ {for (i=2; i<=NF; i++) print $i}'\r\n/home/borja/work/scala/tmp/ScalaByExample/src/main/scala/com/joshroppo/ScalaExamples/palindromes.scala\r\n/home/borja/work/scala/tmp/ScalaByExample/src/main/scala/com/joshroppo/ScalaExamples/Newton.scala\r\n/home/borja/work/scala/tmp/ScalaByExample/src/main/scala/com/joshroppo/ScalaExamples/iterites.scala\r\n/home/borja/work/scala/tmp/ScalaByExample/src/main/scala/com/joshroppo/ScalaExamples/Auction.scala\r\n/home/borja/work/scala/tmp/ScalaByExample/src/main/scala/com/joshroppo/PubSub/EventStream.scala\r\n/home/borja/work/scala/tmp/ScalaByExample/src/main/scala/com/joshroppo/PubSub/HostCatcher.scala\r\n/home/borja/work/scala/tmp/ScalaByExample/src/main/scala/com/joshroppo/PubSub/LinkCheck.scala\r\n/home/borja/work/scala/tmp/ScalaByExample/src/main/scala/com/joshroppo/PubSub/Logger.scala\r\n/home/borja/work/scala/tmp/ScalaByExample/src/main/scala/com/joshroppo/PubSub/Main.scala\r\n\r\nborja@xmi ~/work/scala/tmp/ScalaByExample $ sbt\r\n[info] Loading global plugins from /home/borja/.sbt/1.0/plugins\r\n[info] Loading project definition from /home/borja/work/scala/tmp/ScalaByExample/project\r\n[info] Loading settings from build.sbt ...\r\n[info] Set current project to ScalaExamples (in build file:/home/borja/work/scala/tmp/ScalaByExample/)\r\n[info] sbt server started at 127.0.0.1:4604\r\n```\r\n\r\n## Compilation run\r\n```\r\nsbt:ScalaExamples> clean\r\n[success] Total time: 0 s, completed Mar 29, 2018 11:16:08 PM\r\nsbt:ScalaExamples> compile\r\n[info] Updating {file:/home/borja/work/scala/tmp/ScalaByExample/}scalabyexample...\r\n[info] Done updating.\r\n[info] Compiling 9 Scala sources to /home/borja/work/scala/tmp/ScalaByExample/target/scala-2.10/classes ...\r\n[info] Done compiling.\r\n[success] Total time: 5 s, completed Mar 29, 2018 11:16:16 PM\r\n```\r\n## Semanticdb run\r\n```\r\nsbt:ScalaExamples> clean\r\n[success] Total time: 0 s, completed Mar 29, 2018 11:22:09 PM\r\nsbt:ScalaExamples> semanticdb\r\n[info] Set current project to ScalaExamples (in build file:/home/borja/work/scala/tmp/ScalaByExample/)\r\nList()\r\n[success] Total time: 0 s, completed Mar 29, 2018 11:22:15 PM\r\nsbt:ScalaExamples> \r\n```\r\n\r\nMy current hypothesis is that this is due to our plugin capturing `sbt` projects, and thus repositories that do not define projects are left out.\r\n\r\nSome things to note:\r\n- `unmanagedSources` is where most of the code of the application lives\r\n- `managedSources` is where the generated code lives, for example, from using `scalapb`\r\n- I don't think that distinction has anything to do with it. In the example above, the compiled code is in `unmanagedSources`\r\n- One can use the following `awk` magic to extract the paths:  ` sbt \"show sources\" | awk -F\"\\\\\\\\(|, |\\\\\\\\)|\\\\\\\\* \" ' /(\\(\\/|\\*)/ {for (i=2; i<=NF; i++) print $i}'`\r\n"}}
{"actor":{"display_login":"blorente"}}