From 61d5a22a506632a6782522ffb2b58fb77493bc57 Mon Sep 17 00:00:00 2001 From: Nick Gorbikoff Date: Mon, 7 Sep 2020 17:29:35 -0500 Subject: [PATCH 1/4] Adding crystal-future. Breaking change in 0.35.0 https://github.com/crystal-lang/crystal/blob/master/CHANGELOG.md#concurrency --- shard.yml | 6 +++++- src/lucky-cluster.cr | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/shard.yml b/shard.yml index a6c080c..dc3fc55 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: lucky-cluster -version: 0.2.0 +version: 0.3.0 authors: - Jeremy Woertink @@ -7,3 +7,7 @@ authors: crystal: 0.29.0 license: MIT + +dependencies: + future: + github: crystal-community/future.cr diff --git a/src/lucky-cluster.cr b/src/lucky-cluster.cr index 8c3b9db..f7eb0e4 100644 --- a/src/lucky-cluster.cr +++ b/src/lucky-cluster.cr @@ -1,7 +1,9 @@ +require "future" + module Lucky class Cluster < ::AppServer - VERSION = "0.2.0" + VERSION = "0.3.0" private getter processes : Array(Concurrent::Future(Nil)) private getter reuse_port : Bool property threads : Int32 = 1 From 687ef8f2f38f6c93a90ec956de3cc2f0e4c79c74 Mon Sep 17 00:00:00 2001 From: Nick Gorbikoff Date: Mon, 7 Sep 2020 17:38:33 -0500 Subject: [PATCH 2/4] Rename Concurrent::Future to Future::Compute --- src/lucky-cluster.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lucky-cluster.cr b/src/lucky-cluster.cr index f7eb0e4..0ad4fe9 100644 --- a/src/lucky-cluster.cr +++ b/src/lucky-cluster.cr @@ -4,12 +4,12 @@ module Lucky class Cluster < ::AppServer VERSION = "0.3.0" - private getter processes : Array(Concurrent::Future(Nil)) + private getter processes : Array(Future::Compute(Nil)) private getter reuse_port : Bool property threads : Int32 = 1 def initialize - @processes = [] of Concurrent::Future(Nil) + @processes = [] of Future::Compute(Nil) @reuse_port = true super end From 7d038ef0543021209bd5d0d9cec8b67ee8b28d37 Mon Sep 17 00:00:00 2001 From: Nick Gorbikoff Date: Mon, 7 Sep 2020 18:03:17 -0500 Subject: [PATCH 3/4] Adding Changelog.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a15a05a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +## Version 0.3 + +_NOTE_ This version Crystal > 0.35 + +1. Crystal team has move Concurrent::Future to community-future shard, and remove functionality from standard library in Crystal version 0.35 +2. Discussion is here: https://github.com/crystal-lang/crystal/pull/9093 +3. This update lucky-cluster to be compatible with the change From a932968bda1d1e04e5d1e6199b24302478ce674e Mon Sep 17 00:00:00 2001 From: Nick Gorbikoff Date: Mon, 7 Sep 2020 18:12:02 -0500 Subject: [PATCH 4/4] Fixing typos in Changelog. I can't spell in any language even if my life depended on it :) --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a15a05a..d79ff68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## Version 0.3 -_NOTE_ This version Crystal > 0.35 +_NOTE_ This requires version Crystal > 0.35 -1. Crystal team has move Concurrent::Future to community-future shard, and remove functionality from standard library in Crystal version 0.35 +1. Crystal team has moved Concurrent::Future to community-future shard, and removed functionality from standard library in Crystal version 0.35 2. Discussion is here: https://github.com/crystal-lang/crystal/pull/9093 -3. This update lucky-cluster to be compatible with the change +3. This updates lucky-cluster to be compatible with the change