File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 0.8.5] - 2025-10-27
9+
10+ [ Diff] ( https://github.com/Verseth/ruby-shale-builder/compare/v0.8.3...v0.8.5 )
11+
12+ ### Changes
13+ - Fix the tapioca compiler behaviour with ` T.untyped `
14+
815## [ 0.8.3] - 2025-10-24
916
1017[ Diff] ( https://github.com/Verseth/ruby-shale-builder/compare/v0.8.2...v0.8.3 )
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- shale-builder (0.8.4 )
4+ shale-builder (0.8.5 )
55 booleans (>= 0.1 )
66 shale (< 2.0 )
77 sorbet-runtime (> 0.5 )
Original file line number Diff line number Diff line change 22
33module Shale
44 module Builder
5- VERSION = '0.8.4 '
5+ VERSION = '0.8.5 '
66 end
77end
Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ def decorate
5050 end
5151
5252 if attribute . collection?
53- getter_without_block_type = "T.nilable(T::Array[ #{ return_type } ])"
53+ getter_without_block_type = wrap_nilable_type ( wrap_array_type ( return_type ) )
5454 elsif nilable
55- getter_without_block_type = "T.nilable( #{ return_type } )"
55+ getter_without_block_type = wrap_nilable_type ( return_type )
5656 else
5757 getter_without_block_type = return_type . to_s
5858 end
@@ -64,9 +64,9 @@ def decorate
6464 setter_type , nilable = shale_type_to_sorbet_setter_type ( attribute )
6565 end
6666 if attribute . collection?
67- setter_type_str = "T.nilable(T::Array[ #{ setter_type } ])"
67+ setter_type_str = wrap_nilable_type ( wrap_array_type ( setter_type ) )
6868 elsif nilable
69- setter_type_str = "T.nilable( #{ setter_type } )"
69+ setter_type_str = wrap_nilable_type ( setter_type )
7070 else
7171 setter_type_str = setter_type . to_s
7272 end
@@ -92,6 +92,18 @@ def decorate
9292
9393 end
9494
95+ sig { params ( type : T . untyped ) . returns ( String ) }
96+ def wrap_nilable_type ( type )
97+ return "T.nilable(#{ type } )" if type != T . untyped
98+
99+ T . unsafe ( type ) . to_s
100+ end
101+
102+ sig { params ( type : T . untyped ) . returns ( String ) }
103+ def wrap_array_type ( type )
104+ "T::Array[#{ type } ]"
105+ end
106+
95107 sig do
96108 params (
97109 mod : RBI ::Scope ,
You can’t perform that action at this time.
0 commit comments