typetools / typetools/checker-framework

infer-and-annotate.sh does not handle @sources.lst syntax

Open
#4,692 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

infer-and-annotate.sh will fail if the list of Java files becomes too large for the shell to handle.

I tried infer-and-annotate.sh GuiEffectChecker "classpath" $(find src/main/java *.java) but the find command would return 2315 names with a total size of 162850 characters, which is clearly too long for any command line (I got an "argument list too long" error).

Using the @list-of-files.txt syntax didn't work because it is filtered out in the script code that distinguishes parameters for infer-and-annotate.sh from those for javac, and some parts of the script need the list of files anyway.
I fixed all of this, and could prepare and send patches if desired.
I did not fix the other scripts, so patches are likely incomplete.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting infer-and-annotate.sh, especially the argument filtering that separates its parameters from javac's and the handling of @sources.lst. Reproduce the failure with a large Java file list, then verify that response-file syntax remains available wherever the script needs the file list without breaking other arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, shell
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.