infer icon indicating copy to clipboard operation
infer copied to clipboard

Capture only the files needed for the analysis (reactive capture)

Open sencho opened this issue 9 years ago • 5 comments

Separate analyze and capture phase,i wonder to know how to reduce the capture phase time at iOS project ,i just want to analyze the changed files,but in capture phase Infer must run the translation file action,it translate the whole project files,can i just translate the changed files that i want to analyze?

below is what my command step 1.

infer capture -- xcodebuild -workspace demo.xcworkspace -scheme Debug -sdk iphonesimulator10.1 -configuration Debug build

step 2.

infer --fail-on-issue -a infer --changed-files-index ./index.txt -- analyze

In step 1 waste about 25 mins translate about 1900 files. Assuming that I just modified a file, but wasted 25 minutes during the capture phase, this situation was obviously unreasonable.

sencho avatar May 25 '17 03:05 sencho

The analysis of a procedure in one file depends on the results of the analysis of the all the procedures it transitively calls, which may live in other files. Capturing all the files in your project is a safe way to ensure that all the procedures needed will be available when analysing the changed file.

However, iideally infer would capture only the files that the changed file depends on. We are working on a new mode of analysis in infer called "reactive capture" that does just that: it will only capture the files needed, by starting the analysis of the changed file and compiling other files on-demand as they are needed. This will be able to address the issue that you raise. This isn't quite ready for use yet, stay tuned.

jvillard avatar May 25 '17 09:05 jvillard

@jvillard, Thank you very much for your reply, I also continue to pay attention to the progress of this new function development, hope to be able to try this new function as soon as possible

sencho avatar May 26 '17 15:05 sencho

@jvillard When will reactive capture capability be out?

sukeshmlr avatar Jul 26 '17 04:07 sukeshmlr

@jvillard Is "reactive capture" mode realized?

sencho avatar Jan 17 '18 07:01 sencho

No one in our team is working on reactive capture at the moment.

jvillard avatar Jun 06 '18 11:06 jvillard