From acf934518e8105dbde942fa7e8c10d879b8c4e2b Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 15:39:44 -0400 Subject: [PATCH 1/9] feat: show message for unsupported Crystal versions at compile time --- src/invidious.cr | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index 09fbb624..c77904bb 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -50,6 +50,15 @@ require "./invidious/routes/**" require "./invidious/jobs/base_job" require "./invidious/jobs/*" +# Show a nice message for unsupported versions of the Crystal compiler, +# encouraging the user compiling Invidiou, to update it's Crystal compiler +# version. +{% if compare_versions(Crystal::VERSION, "1.12.0") < 0 %} + {{ raise "Crystal version 1.12.0 or newer is required to build Invidious, \ + you currently have Crystal version #{Crystal::VERSION}, \ + update it to a new version to be able to build Invidious." }} +{% end %} + # Declare the base namespace for invidious module Invidious end From b6f1b886c7b6e85415375edc2a1c9a7ddfb2c4f2 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 15:43:56 -0400 Subject: [PATCH 2/9] typo --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index c77904bb..adc4952e 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -51,7 +51,7 @@ require "./invidious/jobs/base_job" require "./invidious/jobs/*" # Show a nice message for unsupported versions of the Crystal compiler, -# encouraging the user compiling Invidiou, to update it's Crystal compiler +# encouraging the user compiling Invidious, to update it's Crystal compiler # version. {% if compare_versions(Crystal::VERSION, "1.12.0") < 0 %} {{ raise "Crystal version 1.12.0 or newer is required to build Invidious, \ From f1ac178fafea92d86d871d67ad23ade40dd711f9 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 15:45:39 -0400 Subject: [PATCH 3/9] better message --- src/invidious.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index adc4952e..ff378d30 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -56,7 +56,8 @@ require "./invidious/jobs/*" {% if compare_versions(Crystal::VERSION, "1.12.0") < 0 %} {{ raise "Crystal version 1.12.0 or newer is required to build Invidious, \ you currently have Crystal version #{Crystal::VERSION}, \ - update it to a new version to be able to build Invidious." }} + update it to a new version to be able to build Invidious. \ + For more information, visit the official Crystal compiler website: https://crystal-lang.org/install/" }} {% end %} # Declare the base namespace for invidious From 2c2b35607b7e4020e9ab29954bcc6c0a06e801d0 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 15:46:11 -0400 Subject: [PATCH 4/9] Change minimum version to 1.14.1 --- src/invidious.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index ff378d30..5498c9b3 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -53,8 +53,8 @@ require "./invidious/jobs/*" # Show a nice message for unsupported versions of the Crystal compiler, # encouraging the user compiling Invidious, to update it's Crystal compiler # version. -{% if compare_versions(Crystal::VERSION, "1.12.0") < 0 %} - {{ raise "Crystal version 1.12.0 or newer is required to build Invidious, \ +{% if compare_versions(Crystal::VERSION, "1.14.1") < 0 %} + {{ raise "Crystal version 1.14.1 or newer is required to build Invidious, \ you currently have Crystal version #{Crystal::VERSION}, \ update it to a new version to be able to build Invidious. \ For more information, visit the official Crystal compiler website: https://crystal-lang.org/install/" }} From 268d6e8420452d7c59dc41d66e77c0633ed4a202 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 18:13:46 -0400 Subject: [PATCH 5/9] Update src/invidious.cr Co-authored-by: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index 5498c9b3..7aa68eac 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -54,7 +54,7 @@ require "./invidious/jobs/*" # encouraging the user compiling Invidious, to update it's Crystal compiler # version. {% if compare_versions(Crystal::VERSION, "1.14.1") < 0 %} - {{ raise "Crystal version 1.14.1 or newer is required to build Invidious, \ + {{ raise "Crystal version 1.14.1 or newer is required to build Invidious. \ you currently have Crystal version #{Crystal::VERSION}, \ update it to a new version to be able to build Invidious. \ For more information, visit the official Crystal compiler website: https://crystal-lang.org/install/" }} From ac35c032a69f3fa36ee93244cb80d9baf85645aa Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 18:14:01 -0400 Subject: [PATCH 6/9] Update src/invidious.cr Co-authored-by: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index 7aa68eac..7c25da3b 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -55,7 +55,7 @@ require "./invidious/jobs/*" # version. {% if compare_versions(Crystal::VERSION, "1.14.1") < 0 %} {{ raise "Crystal version 1.14.1 or newer is required to build Invidious. \ - you currently have Crystal version #{Crystal::VERSION}, \ + You currently have Crystal version #{Crystal::VERSION} installed. \ update it to a new version to be able to build Invidious. \ For more information, visit the official Crystal compiler website: https://crystal-lang.org/install/" }} {% end %} From 58376e94dcd7225c98c8bd58a55272631f94e0df Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 18:14:15 -0400 Subject: [PATCH 7/9] Update src/invidious.cr Co-authored-by: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index 7c25da3b..70bc31ce 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -57,7 +57,7 @@ require "./invidious/jobs/*" {{ raise "Crystal version 1.14.1 or newer is required to build Invidious. \ You currently have Crystal version #{Crystal::VERSION} installed. \ update it to a new version to be able to build Invidious. \ - For more information, visit the official Crystal compiler website: https://crystal-lang.org/install/" }} + We recommend that you install it following the way that the Crystal compiler itself recommend for your OS, see: https://crystal-lang.org/install/" }} {% end %} # Declare the base namespace for invidious From 67821fa322dad603bcab8bc7287616a056cdb0da Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 18:14:30 -0400 Subject: [PATCH 8/9] Update src/invidious.cr Co-authored-by: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> --- src/invidious.cr | 1 - 1 file changed, 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index 70bc31ce..7c4096f4 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -56,7 +56,6 @@ require "./invidious/jobs/*" {% if compare_versions(Crystal::VERSION, "1.14.1") < 0 %} {{ raise "Crystal version 1.14.1 or newer is required to build Invidious. \ You currently have Crystal version #{Crystal::VERSION} installed. \ - update it to a new version to be able to build Invidious. \ We recommend that you install it following the way that the Crystal compiler itself recommend for your OS, see: https://crystal-lang.org/install/" }} {% end %} From 5fb5a0e833ab18712025eb0afcc9a733e30e566d Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 20:48:55 -0400 Subject: [PATCH 9/9] set min version in a variable --- src/invidious.cr | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 7c4096f4..7ae1406c 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -53,10 +53,13 @@ require "./invidious/jobs/*" # Show a nice message for unsupported versions of the Crystal compiler, # encouraging the user compiling Invidious, to update it's Crystal compiler # version. -{% if compare_versions(Crystal::VERSION, "1.14.1") < 0 %} - {{ raise "Crystal version 1.14.1 or newer is required to build Invidious. \ - You currently have Crystal version #{Crystal::VERSION} installed. \ - We recommend that you install it following the way that the Crystal compiler itself recommend for your OS, see: https://crystal-lang.org/install/" }} +{% begin %} + {% minimum_version = "1.14.1" %} + {% if compare_versions(Crystal::VERSION, minimum_version) < 0 %} + {{ raise "Crystal version #{minimum_version} or newer is required to build Invidious. \ + You currently have Crystal version #{Crystal::VERSION} installed. \ + We recommend that you install it following the way that the Crystal compiler itself recommend for your OS, see: https://crystal-lang.org/install/" }} + {% end %} {% end %} # Declare the base namespace for invidious