{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/4108","repository_url":"https://api.github.com/repos/bazelbuild/bazel","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/4108/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/4108/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/4108/events","html_url":"https://github.com/bazelbuild/bazel/issues/4108","id":274837718,"number":4108,"title":"Build outcome is inaccurate and differs on different platforms","user":{"login":"davido","id":347173,"avatar_url":"https://avatars1.githubusercontent.com/u/347173?v=4","gravatar_id":"","url":"https://api.github.com/users/davido","html_url":"https://github.com/davido","followers_url":"https://api.github.com/users/davido/followers","following_url":"https://api.github.com/users/davido/following{/other_user}","gists_url":"https://api.github.com/users/davido/gists{/gist_id}","starred_url":"https://api.github.com/users/davido/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davido/subscriptions","organizations_url":"https://api.github.com/users/davido/orgs","repos_url":"https://api.github.com/users/davido/repos","events_url":"https://api.github.com/users/davido/events{/privacy}","received_events_url":"https://api.github.com/users/davido/received_events","type":"User","site_admin":false},"labels":[{"id":328197556,"url":"https://api.github.com/repos/bazelbuild/bazel/labels/category:%20multi-platform%20%3E%20windows","name":"category: multi-platform > windows","color":"d4c5f9","default":false},{"id":288539189,"url":"https://api.github.com/repos/bazelbuild/bazel/labels/category:%20rules%20%3E%20java","name":"category: rules > java","color":"d4c5f9","default":false},{"id":192364134,"url":"https://api.github.com/repos/bazelbuild/bazel/labels/P1","name":"P1","color":"d93f0b","default":false},{"id":106503259,"url":"https://api.github.com/repos/bazelbuild/bazel/labels/type:%20bug","name":"type: bug","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":{"login":"cushon","id":478458,"avatar_url":"https://avatars0.githubusercontent.com/u/478458?v=4","gravatar_id":"","url":"https://api.github.com/users/cushon","html_url":"https://github.com/cushon","followers_url":"https://api.github.com/users/cushon/followers","following_url":"https://api.github.com/users/cushon/following{/other_user}","gists_url":"https://api.github.com/users/cushon/gists{/gist_id}","starred_url":"https://api.github.com/users/cushon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cushon/subscriptions","organizations_url":"https://api.github.com/users/cushon/orgs","repos_url":"https://api.github.com/users/cushon/repos","events_url":"https://api.github.com/users/cushon/events{/privacy}","received_events_url":"https://api.github.com/users/cushon/received_events","type":"User","site_admin":false},"assignees":[{"login":"cushon","id":478458,"avatar_url":"https://avatars0.githubusercontent.com/u/478458?v=4","gravatar_id":"","url":"https://api.github.com/users/cushon","html_url":"https://github.com/cushon","followers_url":"https://api.github.com/users/cushon/followers","following_url":"https://api.github.com/users/cushon/following{/other_user}","gists_url":"https://api.github.com/users/cushon/gists{/gist_id}","starred_url":"https://api.github.com/users/cushon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cushon/subscriptions","organizations_url":"https://api.github.com/users/cushon/orgs","repos_url":"https://api.github.com/users/cushon/repos","events_url":"https://api.github.com/users/cushon/events{/privacy}","received_events_url":"https://api.github.com/users/cushon/received_events","type":"User","site_admin":false},{"login":"meteorcloudy","id":4171702,"avatar_url":"https://avatars2.githubusercontent.com/u/4171702?v=4","gravatar_id":"","url":"https://api.github.com/users/meteorcloudy","html_url":"https://github.com/meteorcloudy","followers_url":"https://api.github.com/users/meteorcloudy/followers","following_url":"https://api.github.com/users/meteorcloudy/following{/other_user}","gists_url":"https://api.github.com/users/meteorcloudy/gists{/gist_id}","starred_url":"https://api.github.com/users/meteorcloudy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meteorcloudy/subscriptions","organizations_url":"https://api.github.com/users/meteorcloudy/orgs","repos_url":"https://api.github.com/users/meteorcloudy/repos","events_url":"https://api.github.com/users/meteorcloudy/events{/privacy}","received_events_url":"https://api.github.com/users/meteorcloudy/received_events","type":"User","site_admin":false}],"milestone":null,"comments":33,"created_at":"2017-11-17T11:37:34Z","updated_at":"2017-11-27T09:26:09Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"1. Try to build [gerrit code review](https://gerrit.googlesource.com/gerrit) from this commit (75fa62c694c987d1768017131533d7a9aa45b9da) on Linux:\r\n\r\n```\r\n$ bazel build java/com/google/gerrit/server/diff:diff -s \r\nINFO: Analysed target //java/com/google/gerrit/server/diff:diff (37 packages loaded).\r\nINFO: Found 1 target...\r\nSUBCOMMAND: # //java/com/google/gerrit/server/diff:diff [action 'Building java/com/google/gerrit/server/diff/libdiff.jar (17 source files) and running annotation processors (AutoAnnotationProcessor, AutoValueProcessor)']\r\n(cd /home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/execroot/gerrit && \\\r\n  exec env - \\\r\n    LC_CTYPE=en_US.UTF-8 \\\r\n  external/local_jdk/bin/java -XX:+TieredCompilation '-XX:TieredStopAtLevel=1' -Xbootclasspath/p:external/bazel_tools/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar -jar external/bazel_tools/tools/jdk/JavaBuilder_deploy.jar @bazel-out/k8-fastbuild/bin/java/com/google/gerrit/server/diff/libdiff.jar-2.params)\r\nTarget //java/com/google/gerrit/server/diff:diff up-to-date:\r\n  bazel-bin/java/com/google/gerrit/server/diff/libdiff.jar\r\nINFO: Elapsed time: 4.139s, Critical Path: 0.92s\r\nINFO: Build completed successfully, 3 total actions\r\n```\r\n\r\nit will succeed, where the `libdiff.jar-2.params` - file on Linux is here: http://paste.openstack.org/show/626680.\r\n\r\n2. From the same gerrit commit, with the same Bazel version, I used 0.8.0-rc2, try to build the same rule on Windows:\r\n\r\n```\r\n$ bazel build  java/com/google/gerrit/server/diff:diff -s\r\nSUBCOMMAND: # //java/com/google/gerrit/server/diff:diff [action 'Building java/com/google/gerrit/server/diff/libdiff.jar (17 source files) and running annotation processors (AutoAnnotationProcessor, AutoValueProcessor)']\r\ncd C:/msys64/tmp/_bazel_davido/_biltsqa/execroot/gerrit\r\n  SET LC_CTYPE=en_US.UTF-8\r\n  external/local_jdk/bin/java.exe -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xbootclasspath/p:external/bazel_tools/third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar -jar external/bazel_tools/tools/jdk/JavaBuilder_deploy.jar @bazel-out/x64_windows-fastbuild/bin/java/com/google/gerrit/server/diff/libdiff.jar-2.params\r\n[54 / 55] Building java/com/google/gerrit/server/diff/libdiff.jar (17 source files) and running annotation processors (AutoAnnotationProcessor, AutoValueProcessor); 1s worker\r\nERROR: C:/users/davido/projects/gerrit/java/com/google/gerrit/server/diff/BUILD:1:1: Building java/com/google/gerrit/server/diff/libdiff.jar (17 source files) and running annotation processors (AutoAnnotationProcessor, AutoValueProcessor) failed (Exit 1)\r\nbazel-out\\x64_windows-fastbuild\\bin\\java\\com\\google\\gerrit\\server\\diff\\_javac\\diff\\libdiff_sourcegenfiles\\com\\google\\gerrit\\server\\diff\\AutoValue_IntraLineDiffArgs.java:105: error: incompatible types: NameKey cannot be converted to Object\r\n           && (this.project.equals(that.project()))\r\n                                               ^\r\nNote: Some messages have been simplified; recompile with -Xdiags:verbose to get full output\r\nTarget //java/com/google/gerrit/server/diff:diff failed to build\r\nUse --verbose_failures to see the command lines of failed build steps.\r\nINFO: Elapsed time: 44,308s, Critical Path: 4,68s\r\nFAILED: Build did NOT complete successfully\r\n```\r\n\r\nwhere the `libdiff.jar-2.params` - file in Windows is here: http://paste.openstack.org/show/626690.\r\n\r\nIt turns out, that the root cause is missing transitive dependency on `gwtorm.jar` that was fixed here: [1]. I've created a reproducer: [2].\r\n\r\nIt seems that the problem is reported by error prone, in compilation unit, that was generated by annotation processor (auto-value). I wrote this issue to improve the misleading error message:  #4105.\r\n\r\nThis issue is to track the different build outcomes on Linux and Windows: success vs. failure, correspondingly.\r\n\r\n* [1] https://gerrit-review.googlesource.com/#/c/gerrit/+/142490\r\n* [2] https://github.com/davido/bazel-annotation-processor-breakage"},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/comments/347124234","html_url":"https://github.com/bazelbuild/bazel/issues/4108#issuecomment-347124234","issue_url":"https://api.github.com/repos/bazelbuild/bazel/issues/4108","id":347124234,"user":{"login":"meteorcloudy","id":4171702,"avatar_url":"https://avatars2.githubusercontent.com/u/4171702?v=4","gravatar_id":"","url":"https://api.github.com/users/meteorcloudy","html_url":"https://github.com/meteorcloudy","followers_url":"https://api.github.com/users/meteorcloudy/followers","following_url":"https://api.github.com/users/meteorcloudy/following{/other_user}","gists_url":"https://api.github.com/users/meteorcloudy/gists{/gist_id}","starred_url":"https://api.github.com/users/meteorcloudy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meteorcloudy/subscriptions","organizations_url":"https://api.github.com/users/meteorcloudy/orgs","repos_url":"https://api.github.com/users/meteorcloudy/repos","events_url":"https://api.github.com/users/meteorcloudy/events{/privacy}","received_events_url":"https://api.github.com/users/meteorcloudy/received_events","type":"User","site_admin":false},"created_at":"2017-11-27T09:26:09Z","updated_at":"2017-11-27T09:26:09Z","author_association":"MEMBER","body":"@davido There is a internal change under review from @cushon, which will fix this problem in a more principle way, maybe we can just wait for that one. :)"}}
{"actor":{"display_login":"meteorcloudy"}}