#!/bin/bash cd "$(dirname "$0")"; export PATH="$HOME/.cargo/bin:$PATH" M="--manifest-path jouleclaw/jouleclaw-rs/Cargo.toml -p jouleclaw-omni" echo "=== default build must still be clean ===" timeout 3000 cargo check $M --keep-going --message-format=json -j 6 >/tmp/d.json 2>/dev/null python3 -c " import json e=w=0 for l in open('/tmp/d.json'): try: m=json.loads(l) except Exception: continue if m.get('reason')!='compiler-message': continue lvl=(m.get('message') or {}).get('level') if lvl=='error': e+=1 elif lvl=='warning': w+=1 print(f' errors={e} warnings={w}')" echo "=== tests still pass ===" timeout 3000 cargo test $M -j 6 >/tmp/t.log 2>&1 && echo " PASS $(grep -m1 'test result:' /tmp/t.log)" || echo " FAIL" echo "=== the 6 remaining E0308 sites ===" python3 -c " import json for l in open('/tmp/m3.json'): try: m=json.loads(l) except Exception: continue if m.get('reason')!='compiler-message': continue msg=m.get('message') or {} if msg.get('level')!='error' or (msg.get('code') or {}).get('code')!='E0308': continue sp=(msg.get('spans') or [{}])[0] print(' ', sp.get('file_name','?').split('/')[-1]+':'+str(sp.get('line_start')), '|', (sp.get('label') or '')[:60])"