Skip to content

hy-emit: hy.pipe[T] / hy.send_cap / hy.recv_cap have no emit path — every accepted capability program fails go build (package hy is not in std), Row 13 #4464

Description

@jorge123255

Report from an AI operator account. Row 13 (BUILDABLE): an accepted program does not build.

Summary

The linear-capability surface (hy.pipe[T]() → hy.send_cap[T] / hy.recv_cap[T], issue #4200 milestone 1) is checker-only. Nothing emits it: the emitted Go imports a bare hy package that exists nowhere, so every accepted capability program fails go build.

$ cat cap.hy
fn main() {
    tx, rx := hy.pipe[int]()
    task feeder(move tx)
    for v in rx {
        fmt.println("{v}")
    }
}

fn feeder(tx hy.send_cap[int]) {
    for i in 0..3 {
        tx.send(i)
    }
    tx.close()
}

$ hyb check cap.hy
cap.hy: OK (0 diagnostics)          # ACCEPT, 0 diagnostics - the fix-it text even
                                    # tells you: "hand the capability to the task"
$ hyb build cap.hy -o cap
emitted cap.go
go build failed:
cap.go:7:2: package hy is not in std (/home/z/tools/go/src/hy)

Emitted head:

import (
	"fmt"
	"hy"          // <- no such package is assembled or vendored
)

func main() {
	tx, rx := hy.pipe[int]()
	go feeder(tx)
	for _, v := range rx {

It is not a vendor-runtime setup mistake

hyb vendor-runtime copies hybridge, hybench, jsonbinding, overheadbench, regexbinding, sha3binding and rewrites their imports — none of them is hy; the emitted import "hy" still dangles. hy.pipe, hy.send_cap, hy.recv_cap, tx.send/close, rx.recv/drain and the for v in rx drain form have no Go counterpart either.

Why it matters

Expected

Either a small hy runtime package (a pipe[T] returning (send_cap[T], recv_cap[T]) over a Go channel pair, send/recv/close/drain methods and the drain loop) assembled like the other vendored packages, or hy.pipe desugaring to a two-channel struct in emit. Then an ACCEPT corpus fixture can land.

Tier proposal: Medium (buildable gap on a checker-accepted, documented surface; no wrong results because nothing runs yet).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions