@@ -273,6 +273,11 @@ def all_in_scope_ext_params
273273 param_db = ext_db . params . find { |p | p . name == param_name }
274274 raise "There is no param '#{ param_name } ' in extension '#{ ext_crd [ "name" ] } " if param_db . nil?
275275
276+ next unless ext_db . versions . any? do |ver |
277+ Gem ::Requirement . new ( ext_crd [ "version" ] ) . satisfied_by? ( Gem ::Version . new ( ver [ "version" ] ) ) &&
278+ param_db . defined_in_extension_version? ( ver [ "version" ] )
279+ end
280+
276281 @all_in_scope_ext_params <<
277282 InScopeExtensionParameter . new ( param_db , param_data [ "schema" ] , param_data [ "note" ] )
278283 end
@@ -302,6 +307,11 @@ def in_scope_ext_params(ext_req)
302307 ext_param_db = ext_db . params . find { |p | p . name == param_name }
303308 raise "There is no param '#{ param_name } ' in extension '#{ ext_crd [ "name" ] } " if ext_param_db . nil?
304309
310+ next unless ext_db . versions . any? do |ver |
311+ Gem ::Requirement . new ( ext_crd [ "version" ] ) . satisfied_by? ( Gem ::Version . new ( ver [ "version" ] ) ) &&
312+ ext_param_db . defined_in_extension_version? ( ver [ "version" ] )
313+ end
314+
305315 ext_params <<
306316 InScopeExtensionParameter . new ( ext_param_db , param_data [ "schema" ] , param_data [ "note" ] )
307317 end
@@ -315,8 +325,15 @@ def all_out_of_scope_params
315325
316326 @all_out_of_scope_params = [ ]
317327 in_scope_ext_reqs . each do |ext_req |
318- @arch_def . extension ( ext_req . name ) . params . each do |param_db |
328+ ext_db = @arch_def . extension ( ext_req . name )
329+ ext_db . params . each do |param_db |
319330 next if all_in_scope_ext_params . any? { |c | c . param_db . name == param_db . name }
331+
332+ next unless ext_db . versions . any? do |ver |
333+ Gem ::Requirement . new ( ext_req . version_requirement ) . satisfied_by? ( Gem ::Version . new ( ver [ "version" ] ) ) &&
334+ param_db . defined_in_extension_version? ( ver [ "version" ] )
335+ end
336+
320337 @all_out_of_scope_params << param_db
321338 end
322339 end
0 commit comments