Open loonatick-src opened 8 months ago
Ah well I just saw that this has already an open issue upstream , if I correctly understand that this is the same problem.
Yeah, it's the same issue. It's possible to work around by running the benchmark tool directly without swiftpm - running the benchmark with --debug you can see the actual command line required to drive the benchmark tool and instead run that in ci, the you should get the correct error code surfaced.
Is this also reflected in the docs? I could not find anything of the sort and was going entirely by the 0/2/4 exit codes for swift package benchmark baseline check
.
Thanks for the report, unfortunately away for a couple of weeks and won't have time to check on this until then, sorry for delay.
No worries! Also thank you for pointing out the workaround
From the docs:
But, this does not seem to be the case; this is what I saw.
The return code for improvement is 1, and from the docs I expected it to be 4 in the CI.
I see that the error enum's value is defined as 4 here, and it is thrown from
performCommand
.I suspect that
performCommand
's caller might not be callingexit
with the error enum's raw value as done here.This seems to be happening in the example benchmark comparison run. I couldn't completely trace the call across library boundaries. Is this a bug or am I missing something?
Environment