{"action":"created","issue":{"url":"https://api.github.com/repos/sbt/sbt/issues/2326","labels_url":"https://api.github.com/repos/sbt/sbt/issues/2326/labels{/name}","comments_url":"https://api.github.com/repos/sbt/sbt/issues/2326/comments","events_url":"https://api.github.com/repos/sbt/sbt/issues/2326/events","html_url":"https://github.com/sbt/sbt/issues/2326","id":123103378,"number":2326,"title":"Name hashing breaks when using a package object hierarchy","user":{"login":"dwijnand","id":344610,"avatar_url":"https://avatars.githubusercontent.com/u/344610?v=3","gravatar_id":"","url":"https://api.github.com/users/dwijnand","html_url":"https://github.com/dwijnand","followers_url":"https://api.github.com/users/dwijnand/followers","following_url":"https://api.github.com/users/dwijnand/following{/other_user}","gists_url":"https://api.github.com/users/dwijnand/gists{/gist_id}","starred_url":"https://api.github.com/users/dwijnand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwijnand/subscriptions","organizations_url":"https://api.github.com/users/dwijnand/orgs","repos_url":"https://api.github.com/users/dwijnand/repos","events_url":"https://api.github.com/users/dwijnand/events{/privacy}","received_events_url":"https://api.github.com/users/dwijnand/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sbt/sbt/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/sbt/sbt/labels/Incremental%20compiler","name":"Incremental compiler","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-19T18:40:39Z","updated_at":"2015-12-19T19:37:01Z","closed_at":null,"body":"* sbt version 0.13.9\r\n* scala version 2.11.7\r\n\r\n```scala\r\n// src/main/scala/Foo.scala\r\npackage p\r\n\r\ntrait Foo\r\n```\r\n```scala\r\n// src/main/scala/PackageObject.scala\r\npackage p\r\n\r\nabstract class PackageObject extends Foo\r\n```\r\n```scala\r\n// src/main/scala/package.scala\r\npackage object p extends PackageObject\r\n```\r\n\r\nAny change in `Foo.scala`, even adding a space at the beginning of the file, causes:\r\n```\r\n[error] missing or invalid dependency detected while loading class file 'PackageObject.class'.\r\n[error] Could not access type Foo in package p,\r\n[error] because it (or its dependencies) are missing. Check your build definition for\r\n[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)\r\n[error] A full rebuild may help if 'PackageObject.class' was compiled against an incompatible version of p.\r\n[error] one error found\r\n[error] (compile:compileIncremental) Compilation failed\r\n```\r\n\r\nThe current workaround is disabling name hashing:\r\n```\r\nincOptions ~= (_ withNameHashing false)\r\n```\r\n\r\n/cc @gkossakowski"},"comment":{"url":"https://api.github.com/repos/sbt/sbt/issues/comments/166018154","html_url":"https://github.com/sbt/sbt/issues/2326#issuecomment-166018154","issue_url":"https://api.github.com/repos/sbt/sbt/issues/2326","id":166018154,"user":{"login":"paulp","id":9135,"avatar_url":"https://avatars.githubusercontent.com/u/9135?v=3","gravatar_id":"","url":"https://api.github.com/users/paulp","html_url":"https://github.com/paulp","followers_url":"https://api.github.com/users/paulp/followers","following_url":"https://api.github.com/users/paulp/following{/other_user}","gists_url":"https://api.github.com/users/paulp/gists{/gist_id}","starred_url":"https://api.github.com/users/paulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulp/subscriptions","organizations_url":"https://api.github.com/users/paulp/orgs","repos_url":"https://api.github.com/users/paulp/repos","events_url":"https://api.github.com/users/paulp/events{/privacy}","received_events_url":"https://api.github.com/users/paulp/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T19:37:01Z","updated_at":"2015-12-19T19:37:01Z","body":"Anyone looking at this should look at [SI-9580](https://issues.scala-lang.org/browse/SI-9580) which suggests fundamental breakage in package objects plus inheritance."}}