Feature request: `do-like-javac` should support projects with a subdirectory structure
Summary
Currently, running wpi.sh on a project with a subdirectory structure (i.e., having one or more subdirectories which are themselves compilable units) appears to be failing with an error related to do-like-javac.
For example, the project below
https://github.com/Javacord/Javacord f8eedf6c6a9c61d2d74b28202a370c9cccd175cc
Compiles without warning using the compile-project script from manage-git-branches.
However, when wpi.sh is executed from the root of the project:
% wpi.sh -- --checker optional
The script immediately returns with the following output:
Starting wpi.sh.
Finished configuring wpi.sh.
no build file found for ; not calling DLJC
First run configure_and_exec_dljc with JAVA_HOME=/homes/gws/jmsy/opt/jdk/jdk-11.0.19: WPI_RESULTS_AVAILABLE=no build file found for ; not calling DLJC
wpi.sh: dljc could not run the build successfully: no build file found for ; not calling DLJC
Check the log files in /scratch/jmsy/Javacord/dljc-out/ for diagnostics.
Exiting wpi.sh successfully; pwd=/scratch/jmsy/Javacord
And the dljc-out/ folder mentioned in the message is not produced.
The script does say
First run configure_and_exec_dljc with JAVA_HOME=/homes/gws/jmsy/opt/jdk/jdk-11.0.19: WPI_RESULTS_AVAILABLE=no build file
But I am unsure if that is related or a red herring.
Running do-like-javac manually from the root of Javacord:
% ./dljc -o logs -- ./gradlew assemble
yields the following
Traceback (most recent call last):
File "/scratch/jmsy/Javacord/./dljc", line 5, in <module>
do_like_javac.run()
File "/scratch/jmsy/Javacord/do_like_javac/command.py", line 29, in main
raise ValueError(f"no javac commands found by capturer:\n\tcmd = {cmd}\n\targs = {args}")
ValueError: no javac commands found by capturer:
cmd = ['./gradlew', 'assemble']
args = Namespace(output_directory='/scratch/jmsy/Javacord/logs', log_to_stderr=False, tool=None, timeout=None, guess_source=False, verbose=True, cache=False, checker=None, stubs=None, ajava=None, lib_dir=None, jdkVersion=None, quals=None, extraJavacArgs=None, solver='checkers.inference.solver.DebugSolver', afuOutputDir='afud/', mode='INFER', solverArgs='backEndType=maxsatbackend.MaxSat', cfArgs='', graph_jar=None, batches=-1, projectfile=None, daikon_xml=False, error_driver=False, nullarg=None)
I have attached the logs of this execution here logs.zip.