acton icon indicating copy to clipboard operation
acton copied to clipboard

Stuck compilation due to type inference

Open mzagozen opened this issue 11 months ago • 0 comments

Acton Version

0.20.1

Steps to Reproduce and Observed Behavior

Starting with acton 0.19.x, compilation of https://github.com/vrnetlab/vrnetlab/blob/b56ba43e6962109c1631a478df09f0457200a6be/vr-xcon/xcon.act never completes, just occupies a CPU core for a lot of time (aborted after 2800 seconds):

Building file xcon.act
  Compiling xcon.act for release

I have identified the problem as the _on_tcp_receive() method in the TcpEndpoint actor. If I add an explicit type signature for data: bytes argument, it works:

    def _on_tcp_receive(c, data: bytes):
        if _other is not None:
            _other.write(data)
            if trace:
               print("%s -> %s: %d bytes" % (id, _other.id, len(data)))

Expected Behavior

Type inference should work correctly, like in action 0.18.5 and prior.

mzagozen avatar Mar 04 '24 13:03 mzagozen