From 41c3b5181d8fae4c4a94a7c900ff45a76705bbf7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 19 Nov 2025 21:46:58 +0000 Subject: [PATCH] inko: 0.18.1 -> 0.19.1 --- pkgs/by-name/in/inko/package.nix | 6 +++--- pkgs/by-name/in/inko/test.nix | 20 ++++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/in/inko/package.nix b/pkgs/by-name/in/inko/package.nix index 9b7b070497a2..edcfe47691ab 100644 --- a/pkgs/by-name/in/inko/package.nix +++ b/pkgs/by-name/in/inko/package.nix @@ -15,16 +15,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "inko"; - version = "0.18.1"; + version = "0.19.1"; src = fetchFromGitHub { owner = "inko-lang"; repo = "inko"; tag = "v${finalAttrs.version}"; - hash = "sha256-jVfAfR02R2RaTtzFSBoLuq/wdPaaI/eochrZaRVdmHY="; + hash = "sha256-ZHVOwYvNRL2ObZt2PvayoqvS64MumN4oXQOgeCWbEUM="; }; - cargoHash = "sha256-IOMhwcZHB5jVYDM65zifxCjVHWl1EBbxNA3WVmarWcs="; + cargoHash = "sha256-BHrbqPMQnhw8pjN8e0/qW1rPe/fMhs2iUbRVPt5ATrg="; buildInputs = [ libffi diff --git a/pkgs/by-name/in/inko/test.nix b/pkgs/by-name/in/inko/test.nix index 4b6d637de3ff..3ed311a0f826 100644 --- a/pkgs/by-name/in/inko/test.nix +++ b/pkgs/by-name/in/inko/test.nix @@ -7,26 +7,30 @@ let source = + # https://docs.inko-lang.org/manual/v0.19.1/getting-started/hello-concurrency/#channels writeText "hello.inko" # inko '' import std.process (sleep) - import std.stdio (STDOUT) + import std.stdio (Stdout) + import std.sync (Channel) import std.time (Duration) - class async Printer { - fn async print(message: String, channel: Channel[Nil]) { - let _ = STDOUT.new.print(message) + type async Printer { + fn async print(message: String, channel: uni Channel[Nil]) { + let _ = Stdout.new.print(message) channel.send(nil) } } - class async Main { + type async Main { fn async main { - let channel = Channel.new(size: 2) + let channel = Channel.new - Printer().print('Hello', channel) - Printer().print('world', channel) + Printer().print('Hello', recover channel.clone) + Printer().print('world', recover channel.clone) + + sleep(Duration.from_millis(500)) channel.receive channel.receive