We have an app with a bunch of framework dependencies that we build in-house. I noticed recently that one of the higher-level framework dependencies seemed to always re-compile, even if I have not changed a single file. The other lower frameworks do not re-compile anything. I've double checked the framework references and there are no cyclic dependencies and everything imported by this framework is explicitly referenced in the linker settings.
I enabled -driver-show-incremental
and started seeing a couple of errors emitted
error: invalid Swift parseable output message (invalid pid (no subtask record)): { "kind": "finished", "name": "compile", "pid": 52000, "process": { "real_pid": 52000 }, "exit-status": 0 } (in target 'AppFramework' from project 'AppFramework')
and
Command CompileSwiftSources emitted errors but did not return a nonzero exit code to indicate failure
In addition, in the build output I see a bunch of queueing lines like the following
Queuing because of external dependencies: {compile: TracksLayerSection.o <= TracksLayerSection.swift}
Interestingly at the same point every time this output gets corrupted with some JSON output whenever the first error above is encountered
Queuing because of external dependencies: {compile: GPSProfileWizardStepViewController.o <= GPSProfileWizardStepViewController.swift} Queuing because of external dependencies: {compile: ProfileItemPickerViewController.o <= ProfileItemPickerViewController.swift} Queuing because of external dependencies: {compile: GPSSRPickerViewController.o <= GPSSRPickerViewController.swift} Queuing because of external dependencies: {compile: MapSRPickerViewController.o <= MapSRPickerViewController.swift} Queuing because of external dependencies: {compile: UIBarBut14672 { "kind": "began", "name": "compile", .............. ], "pid": 52000, "process": { "real_pid": 52000 } } error: invalid Swift parseable output message (invalid pid (no subtask record)): { "kind": "finished", "name": "compile", "pid": 52000, "process": { "real_pid": 52000 }, "exit-status": 0 }
I've tried disabling batch mode -disable-batch-mode
I get the same errors.
I've tried the legacy build system and that does also re-compiles all of the files in that framework but doesn't emit the same error. I've also tried Xcode 11.7 and 12.0.1
I should point out that MOST of the time the error emitted matches this exactly
error: invalid Swift parseable output message (invalid pid (no subtask record)): { "kind": "finished", "name": "compile", "pid": -1000, "process": { "real_pid": 62841 }, "exit-status": 0 }
note the pid = -1000
Anyone have any ideas?