From 5fa36ddbf74c502501e66271cc58a4221cf63bef Mon Sep 17 00:00:00 2001 From: Genar Trias Ortiz Date: Thu, 26 Sep 2024 15:58:38 +0200 Subject: [PATCH] Workaround for Tapioca DSL with RuntimeGeneric Since this `self.entity` needs RuntimeGeneric and it's evaluated by `tapioca dsl` this is triggering an incompatible error with how RuntimeGeneric works. This PR addresses it by early returning in this method when Tapioca is evaluating. Not very elegant but it makes the trick --- lib/public/repositories/base.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/public/repositories/base.rb b/lib/public/repositories/base.rb index 65da792..ad99f7b 100644 --- a/lib/public/repositories/base.rb +++ b/lib/public/repositories/base.rb @@ -23,6 +23,8 @@ module Base sig { returns(T.untyped) } def self.entity + return nil if defined?(Tapioca) + T.unsafe(const_get(:Entity)).inner_type[:fixed] end