Bug 562274 - Bazel build is broken on JGit@HEAD
Summary: Bazel build is broken on JGit@HEAD
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 5.8   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-17 17:35 EDT by David Ostrovsky CLA
Modified: 2020-12-24 11:04 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Ostrovsky CLA 2020-04-17 17:35:52 EDT
On JGit@HEAD (f5be334a44f29734ae4dac69dfed155a8448d967)

  $ bazel test //...

doesn't compile:

  $ bazel test //...
INFO: Invocation ID: e82ceef4-9903-4b86-b2fe-8a145d5c4c59
DEBUG: /home/davido/.cache/bazel/_bazel_davido/e1ee1c2b4d81e57e5c4b6fbb219eece8/external/bazel_skylib/lib/versions.bzl:96:18: Current Bazel is not a release version; cannot check for compatibility. Make sure that you are running at least Bazel 2.2.0.
INFO: Analyzed 381 targets (78 packages loaded, 3091 targets configured).
INFO: Found 381 test targets...
INFO: From Building org.eclipse.jgit.lfs/libjgit-lfs-class.jar (32 source files):
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java:171: warning: [BadComparable] Possible sign flip from narrowing conversion
		return (int) (getSize() - o.getSize());
		       ^
    (see https://errorprone.info/bugpattern/BadComparable)
  Did you mean 'return Long.compare(getSize(), o.getSize());'?
INFO: From Building org.eclipse.jgit.lfs.server/libjgit-lfs-server-class.jar (14 source files):
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java:115: warning: [Finally] If you return or throw from a finally, then values returned or thrown from the try-catch block will be ignored. Consider using try-with-resources instead.
					return;
					^
    (see https://errorprone.info/bugpattern/Finally)
ERROR: /home/davido/projects/jgit/org.eclipse.jgit.test/BUILD:47:6: Building org.eclipse.jgit.test/org_eclipse_jgit_api_SecurityManagerMissingPermissionsTest.jar (2 source files) failed (Exit 1)
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java:24: error: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
                       ^
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java:25: error: package org.apache.log4j does not exist
import org.apache.log4j.PatternLayout;
                       ^
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java:26: error: package org.apache.log4j does not exist
import org.apache.log4j.WriterAppender;
                       ^
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java:46: error: cannot find symbol
	private WriterAppender appender;
	        ^
  symbol:   class WriterAppender
  location: class SecurityManagerMissingPermissionsTest
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java:55: error: cannot find symbol
		appender = new WriterAppender(
		               ^
  symbol:   class WriterAppender
  location: class SecurityManagerMissingPermissionsTest
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java:56: error: cannot find symbol
				new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN),
				    ^
  symbol:   class PatternLayout
  location: class SecurityManagerMissingPermissionsTest
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java:56: error: cannot find symbol
				new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN),
				                  ^
  symbol:   variable PatternLayout
  location: class SecurityManagerMissingPermissionsTest
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java:59: error: cannot find symbol
		Logger.getRootLogger().addAppender(appender);
		^
  symbol:   variable Logger
  location: class SecurityManagerMissingPermissionsTest
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java:95: error: cannot find symbol
		Logger.getRootLogger().removeAppender(appender);
		^
  symbol:   variable Logger
  location: class SecurityManagerMissingPermissionsTest
INFO: Elapsed time: 38.364s, Critical Path: 36.34s
INFO: 144 processes: 19 linux-sandbox, 125 worker.
FAILED: Build did NOT complete successfully
Comment 1 Eclipse Genie CLA 2020-04-17 18:06:01 EDT
New Gerrit change created: https://git.eclipse.org/r/161164
Comment 2 David Ostrovsky CLA 2020-04-22 01:40:18 EDT
Can someone from JGit maintainers help me to understand
what happened to my change that was uploaded recently?

If I try to open that change: [1], I see this error message:

  The page you requested was not found, or you do not have permission to view this page.

[1] https://git.eclipse.org/r/161164
Comment 3 David Pursehouse CLA 2020-04-22 01:48:17 EDT
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=561802
Comment 4 Matthias Sohn CLA 2020-12-24 11:04:29 EST
your fix was merged