convert build_*/attach_* functions to generators