Open jose opened 8 years ago
This is related to issue #111. Defects4J calls the compile task of the project before exporting a property. Since the dependencies are set up in a way that every compilation cleans the target directories first, the test classes are deleted.
hi. can u please help me with the set up process of defects4j. i do clone but thereafter , i am not able to run all commands eg. defects4j info -p Lang
@mobilemania123 This issue about removing .class
files is not the right place to ask an unrelated question. As a quick answer, merely cloning is not enough. You should follow the setup instructions.
@rjust @jose Issue #111 was closed---did that resolve this issue?
@bkushigian, no.
This is related to issue #111. Defects4J calls the compile task of the project before exporting a property. Since the dependencies are set up in a way that every compilation cleans the target directories first, the test classes are deleted.
Could I understand it this way if I modify the code and compile it again, Defects4J will recompile by default without being affected by previous results?
@BEbillionaireUSD If you modify the source code in a Defects4J working directory and then rerun defects4j compile, Defects4J should incrementally compile your changes. (As a simple test, you can modify an existing source file so that it no longer compiles.)
That said, we have seen reports of the underlying build system not picking up incremental changes reliably, possibly leading to stale class files. Therefore, it is best to delete at least the class file that you want Defects4J to recompile before calling the compile or test command.
If you have additional questions, please open a new issue. Issue #39 is about the export command and issue #111 is about gradle builds.
Hi,
I noticed that for (at least one) Mockito's bug
defects4j export
deletes the test classes directory. For example, suppose that I checkout Mockito-25b and then I compile it:at this point I have a target directory with two sub-directories: classes and test-classes, each one with the respective .class files.
But, if I execute
$D4J_HOME/framework/bin/defects4j export -p cp.compile
or$D4J_HOME/framework/bin/defects4j export -p cp.test
the target/test-classes is deleted.The world will not end tomorrow just because of this, but anyway... :smiley: