From acf934518e8105dbde942fa7e8c10d879b8c4e2b Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 15:39:44 -0400 Subject: [PATCH] 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