Errors building Mantis from source following official docs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 224
- Avg merge
- 22h 46m
- Merged PRs (30d)
- 1
Description
Summary
Hey folks. I'm having some difficulty building the complete Mantis project, as well as its examples from source.
I assume this is my environment being incorrectly configured rather than an issue with the master branch.
It would be awesome if we could figure out what's missing and update the docs to include those dependencies.
Thanks for taking a look!
Reproduction
I get errors when following the build instructions in the README:
$ git clone git@github.com:Netflix/mantis.git
$ cd mantis
$ ./gradlew clean build
BUILD FAILED in 4s
I get similar errors when following the instructions from the "Local" tutorial:
$ git clone git@github.com:Netflix/mantis.git
$ cd mantis/mantis-examples/mantis-examples-synthetic-sourcejob
$ ../../gradlew execute
BUILD FAILED in 3s
I've demonstrated my environment is at least somewhat correctly setup by successfully building mantis-mql from source:
$ git clone https://github.com/Netflix/mantis-mql
$ ./gradlew clean build
BUILD SUCCESSFUL in 52s
Here's some metadata around what I believe is being used to build Mantis:
$ ./gradlew --version
------------------------------------------------------------
Gradle 7.5
------------------------------------------------------------
Build time: 2022-07-14 12:48:15 UTC
Revision: c7db7b958189ad2b0c1472b6fe663e6d654a5103
Kotlin: 1.6.21
Groovy: 3.0.10
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 17.0.6 (Eclipse Adoptium 17.0.6+10)
OS: Mac OS X 14.1.2 aarch64
Details
It looks like at least two tasks are failing with quite loud stacktraces which I'm partially summarizing below:
> Task :mantis-common-serde:spotlessJava FAILED
Step 'removeUnusedImports' found problem in 'mantis-common-serde/src/main/java/io/mantisrx/common/JsonSerializer.java':
null
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalAccessError: class com.google.googlejavaformat.java.RemoveUnusedImports (in unnamed module @0x2c6b2f25) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x2c6b2f25
at com.google.googlejavaformat.java.RemoveUnusedImports.removeUnusedImports(RemoveUnusedImports.java:188)
... 136 more
> Task :mantis-common:compileJava FAILED
/Users/jpittis/mantis/mantis-common/src/main/java/io/reactivx/mantis/operators/OperatorOnErrorResumeNextViaFunction.java:76: warning: [deprecation] getInstance() in RxJavaPlugins has been deprecated
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
^
/Users/jpittis/mantis/mantis-common/src/main/java/io/reactivx/mantis/operators/OperatorOnErrorResumeNextViaFunction.java:76: warning: [deprecation] handleError(Throwable) in RxJavaErrorHandler has been deprecated
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
^
/Users/jpittis/mantis/mantis-common/src/main/java/io/reactivx/mantis/operators/OnSubscribeRedo.java:79: warning: [deprecation] <T>create(OnSubscribe<T>) in Observable has been deprecated
return create(new OnSubscribeRedo<T>(source, notificationHandler, true, false, Schedulers.trampoline()));
^
where T is a type-variable:
T extends Object declared in method <T>create(OnSubscribe<T>)
/Users/jpittis/mantis/mantis-common/src/main/java/io/reactivx/mantis/operators/OnSubscribeRedo.java:83: warning: [deprecation] <T>create(OnSubscribe<T>) in Observable has been deprecated
return create(new OnSubscribeRedo<T>(source, notificationHandler, true, false, scheduler));
^
where T is a type-variable:
T extends Object declared in method <T>create(OnSubscribe<T>)
/Users/jpittis/mantis/mantis-common/src/main/java/io/reactivx/mantis/operators/OnSubscribeRedo.java:108: warning: [deprecation] <T>create(OnSubscribe<T>) in Observable has been deprecated
return create(new OnSubscribeRedo<T>(source, notificationHandler, false, true, Schedulers.trampoline()));
^
where T is a type-variable:
T extends Object declared in method <T>create(OnSubscribe<T>)
/Users/jpittis/mantis/mantis-common/src/main/java/io/reactivx/mantis/operators/OnSubscribeRedo.java:112: warning: [deprecation] <T>create(OnSubscribe<T>) in Observable has been deprecated
return create(new OnSubscribeRedo<T>(source, notificationHandler, false, true, scheduler));
^
where T is a type-variable:
T extends Object declared in method <T>create(OnSubscribe<T>)
/Users/jpittis/mantis/mantis-common/src/main/java/io/reactivx/mantis/operators/OnSubscribeRedo.java:116: warning: [deprecation] <T>create(OnSubscribe<T>) in Observable has been deprecated
return create(new OnSubscribeRedo<T>(source, notificationHandler, false, false, scheduler));
^
where T is a type-variable:
T extends Object declared in method <T>create(OnSubscribe<T>)
7 warnings
An exception has occurred in the compiler (17.0.6). Please file a bug against the Java compiler via the Java bug reporting page (https://bugreport.java.com) after checking the Bug Database (https://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
java.lang.NullPointerException: Cannot read field "bindingsWhenTrue" because "currentBindings" is null
at jdk.compiler/com.sun.tools.javac.comp.Attr.handleSwitch(Attr.java:1794)
...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the build instructions in README and the linked Local tutorial, then reproduce both Gradle commands using the reported Gradle 7.5, JDK 17.0.6, and macOS environment. Inspect the failures in spotlessJava and compileJava, identify the required dependency or version guidance, and update the relevant documentation once the full build and synthetic-sourcejob example can be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100