#!/bin/bash cd "$(dirname "$0")"; export PATH="$HOME/.cargo/bin:$PATH" timeout 3000 cargo check --manifest-path jouleclaw/jouleclaw-rs/Cargo.toml -p jouleclaw-omni \ --features metal --keep-going --message-format=json -j 6 >/tmp/m3.json 2>/dev/null python3 - <<'PY' import json, collections, re codes=collections.Counter(); pairs=collections.Counter(); files=collections.Counter(); tot=0 for line in open('/tmp/m3.json'): try: m=json.loads(line) except Exception: continue if m.get('reason')!='compiler-message': continue msg=m.get('message') or {} if msg.get('level')!='error': continue tot+=1 codes[(msg.get('code') or {}).get('code') or '?']+=1 sp=msg.get('spans') or [] if sp: files[sp[0]['file_name'].split('/')[-1]]+=1 for s2 in sp: lbl=s2.get('label') or '' mm=re.search(r'expected `?([^`,]+)`?,?\s*found `?([^`]+)`?', lbl) if mm: pairs[(mm.group(1).strip()[:26], mm.group(2).strip()[:26])]+=1 print(f" TOTAL ERRORS: {tot} (was 286)") print(" by code:", dict(codes.most_common(9))) print(" top expected->found:") for (e,f),n in pairs.most_common(6): print(f" {n:4} expected {e:26} found {f}") print(" worst files:", dict(files.most_common(6))) PY