S0004: effect is not a valid ingress effect
Generated from rellum-diagnostics/src/db.rs.
Explanation
Only ingress effects can appear inside event(...). Output effects run during Fire and do not produce event payloads during Observe, so they cannot define reactive event sources.
Common causes
- using print!, write!, send!, sleep!, or another output effect in event(...)
- confusing an effect binding with an event source
Canonical fixes
- use an ingress effect for the event
Before:
line = event(print!("ready"))
After:
line = event(stdin_line!())
- move output effects into a ! binding
Before:
done = event(write!("build/out.txt", "ready"))
After:
main! = write!("build/out.txt", "ready")
Code example
line = event(print!("ready"))