Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OkBuck is executing Dagger on tests even if it wasn't told to do so #360

Closed
vanniktech opened this issue Jan 27, 2017 · 6 comments
Closed
Labels

Comments

@vanniktech
Copy link

This time with repro - https://github.com/vanniktech/okbuck-playground/pull/5

Is this by design?

@kageiit
Copy link
Contributor

kageiit commented Jan 28, 2017

Definitely not by intelligent design, but more of a simplification made in the early days. This needs to be refactored to work like any other compile time dependency config by taking main/test/flavor/buildtype conventions into account

@kageiit kageiit added the bug label Jan 28, 2017
@vanniktech
Copy link
Author

I think this might break ./buckw test for my project since building the app version using ./buckw build appDeug works. When executing ./buckw test, I get:

An exception has occurred in the compiler (1.8.0_60). Please file a bug at the Java Bug Database (http://bugreport.java.com/bugreport/) after checking the database for duplicates. Include your program and the following diagnostic in your report.  Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.invoke.MethodType not found

An exception has occurred in the compiler (1.8.0_60). Please file a bug at the Java Bug Database (http://bugreport.java.com/bugreport/) after checking the database for duplicates. Include your program and the following diagnostic in your report.  Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.invoke.MethodType not found

BUILD FAILED: //app:test_debug#testsjar failed with exit code 1:
javac
stderr: An exception has occurred in the compiler (1.8.0_60). Please file a bug at the Java Bug Database (http://bugreport.java.com/bugreport/) after checking the database for duplicates. Include your program and the following diagnostic in your report.  Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.invoke.MethodType not found

@kageiit
Copy link
Contributor

kageiit commented Jan 28, 2017

Yep. I'm in the process of untangling the dependencies and make them better isolated :)

@vanniktech
Copy link
Author

vanniktech commented Jan 30, 2017

@kageiit I'm still getting the above error (com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.invoke.MethodType not found) when executing the tests with version (0.16.0 and 0.16.3)

@kageiit
Copy link
Contributor

kageiit commented Jan 30, 2017

Hmm. Would be great to get some repro steps at this point.

@kageiit kageiit reopened this Jan 30, 2017
@vanniktech
Copy link
Author

Since I'm using Java 8 in my unit tests I needed to add the rt.jar as a testCompile dependency.

Go to /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk and search for rt.jar which should be under ./Contents/Home/jre/lib/rt.jar. Copy the rt.jar into your_path/project/app/libs and then add a test dependency to this one: testCompile files('libs/rt.jar').

After this you should be able to run your unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants