bynk.parse.removed_send_arrow
Error The ~> send was removed; write do e.detach().
~> was removed. It started an effect and carried on without waiting, which e.detach() now says as an ordinary effect statement: it works for any Effect[T], inside a lambda, forEach or helper, and reports a fault or an Err instead of losing it. Write do e.detach() where you wrote ~> e. For a unit effect that does not need to outlive the handler, plain do e is enough, since Logger calls finish before they return. On v0.603.x, bynk check --fix rewrites each ~> e for you. See the Book's Upgrading page.
Example
service api from http { on GET("/") () -> Effect[HttpResult[String]] by Visitor given Logger { ~> Logger.info("served") // ✗ removed Ok("ok") }}
service api from http { on GET("/") () -> Effect[HttpResult[String]] by Visitor given Logger { do Logger.info("served").detach() // ✓ an ordinary statement Ok("ok") }}In the Book
See also
- The grammar rule it governs:
do_stmt. - Every code in its category, Parser, on the diagnostic index.
bynk explain bynk.parse.removed_send_arrowshows the same from the installed toolchain, without a network.