Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler): Fix closure stream capture [fixes LNG-58] #857

Merged
merged 35 commits into from
Sep 1, 2023

Conversation

InversionSpaces
Copy link
Contributor

No description provided.

@InversionSpaces InversionSpaces added the e2e Run e2e workflow label Aug 24, 2023
@linear
Copy link

linear bot commented Aug 24, 2023

LNG-58 Invalid variable name in generated AIR

aqua:

import "fluencelabs/aqua-lib/builtin.aqua"

func test() -> string:
    successful: *bool
    successful <<- true

    status: *string
    waiting = ():
      join successful[0]
      status <<- "ok"

    waiting()
    par status <- Peer.timeout(1000, "timeout")

  <- status!

AIR:

(seq
(seq
 (seq
  (seq
   (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
   (new $status
    (seq
     (new $successful
      (seq
       (ap true $successful)
       (par
        (seq
         (call %init_peer_id% ("op" "noop") [$successful.$.[0]!])
         (ap "ok" $status-0)
        )
        (call %init_peer_id% ("peer" "timeout") [1000 "timeout"] $status)
       )
      )
     )
     (call %init_peer_id% ("op" "identity") [$status.$.[0]!] status-fix)
    )
   )
  )
  (call %init_peer_id% ("--after-callback-srv-service--" "console-log") [status-fix])
 )
 (call %init_peer_id% ("--finisher--" "--finish-execution--") [])
)
(call %init_peer_id% ("callbackSrv" "response") ["ok"])
)

(ap "ok" $status-0) should be (ap "ok" $status)

@InversionSpaces InversionSpaces marked this pull request as ready for review August 31, 2023 14:53
@DieMyst DieMyst merged commit 443e65e into main Sep 1, 2023
10 checks passed
@DieMyst DieMyst deleted the fix/stream-closure-capture branch September 1, 2023 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants