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

Feature request: do-like-javac should support projects with a subdirectory structure #6224

Open
jyoo980 opened this issue Oct 3, 2023 · 1 comment
Assignees

Comments

@jyoo980
Copy link
Contributor

jyoo980 commented Oct 3, 2023

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.

@jyoo980
Copy link
Contributor Author

jyoo980 commented Oct 3, 2023

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.

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

No branches or pull requests

2 participants