I don't know what the root cause here, but when I filter out instrumenting for some files, there appears return ... -level 0, so after loading uninstrumented, file gets instrumented anyways. Problematic code is after the comment
# If the "dontInstrument" flag is true, just source the file
# normally, taking care to propagate the error result.
Just put "puts" after "return" in this branch and you will see, that return does not actually return. I don't know how to fix that properly, but I just removed -level and -code from options and it seem to be a workaround.
I don't know what the root cause here, but when I filter out instrumenting for some files, there appears
return ... -level 0, so after loading uninstrumented, file gets instrumented anyways. Problematic code is after the commentJust put "puts" after "return" in this branch and you will see, that return does not actually return. I don't know how to fix that properly, but I just removed
-leveland-codefromoptionsand it seem to be a workaround.