From 830e852e2f038436cf97b1db8b90e641bb376b62 Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Mon, 14 Mar 2022 11:51:01 +1100 Subject: [PATCH] fix(drivers): discovery matches abstract classes these files can't be compiled so should be ignored --- src/placeos-build/drivers.cr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/placeos-build/drivers.cr b/src/placeos-build/drivers.cr index 075704c..78ac501 100644 --- a/src/placeos-build/drivers.cr +++ b/src/placeos-build/drivers.cr @@ -277,7 +277,9 @@ module PlaceOS::Build Dir .glob(repository_path / "drivers/**/*.cr") .select! { |file| - !file.ends_with?("_spec.cr") && File.read_lines(file).any?(&.includes?("< PlaceOS::Driver")) + !file.ends_with?("_spec.cr") && File.read_lines(file).any? { |line| + line.includes?("< PlaceOS::Driver") && !line.includes?("abstract ") + } } .map(&.lchop(repository_path.to_s).lchop('/')) .tap do |drivers|