javacc / javaccPlugin

A JavaCC plugin for Gradle
MIT License
33 stars 16 forks source link

Feature/cpp user ast #38

Closed zosrothko closed 7 years ago

zosrothko commented 7 years ago

Hi

This is the PR for adding the support of cpp JJTree and JavaCC for the C++ generation.

There is one thing that does not work is the implicit dependency from the CompileCpp task to the CompileJavaCCTask and CompileJJtreeTask and I have no idea why.

zosrothko commented 7 years ago

Hi John The Travis check fails with this error

ca.coglinc.gradle.plugins.javacc.JavaToJavaccDependencyActionTest > noInteractionsWithProjectIfJavaPluginNotApplied FAILED

    org.mockito.exceptions.verification.TooManyActualInvocations at JavaToJavaccDependencyActionTest.java:168

but I do not understand the test. Can you have a look?

johnmartel commented 7 years ago

Hi Francis,

This test ensured that the plugin does not modify the project in any way. The only expected interaction is to get the project's plugins to see if the java plugin is there. I guess that since you are inserting the javacc compilation in the cpp compilation process, you might be having extra interactions that I did not plan for in the first place.

zosrothko commented 7 years ago

So how can I fix this test or may be it would be better if you could fix it?

johnmartel commented 7 years ago

I can have a look later on, as I am currently working on issue #22, but if your new interactions are expected, you can add them to the list of expected interactions in the test, or if they are accidents, simply fix your code to remove these interactions. I don't know about the cpp compilation process in gradle, but I don't expect you need more interactions with the project. Mockito should be telling you which extra interactions are happening.

If French is easier for you, you can send me direct messages :)