lib/steep/drivers/checkfile.rb in steep-1.8.3 vs lib/steep/drivers/checkfile.rb in steep-1.9.0.dev.1
- old
+ new
@@ -51,11 +51,11 @@
[]
when command_line_args.empty?
nil
else
command_line_args
- end
+ end #: Array[String]?
if ruby_patterns
loader.each_path_in_patterns(target.source_pattern, ruby_patterns) do |path|
target_paths << path
end
@@ -67,24 +67,24 @@
[]
when command_line_args.empty?
nil
else
command_line_args
- end
+ end #: Array[String]
if rbs_patterns
loader.each_path_in_patterns(target.signature_pattern, rbs_patterns) do |path|
signature_paths << path
end
end
end
stdin_input.each_key do |path|
- case ts = project.targets_for_path(path)
- when Array
+ case
+ when project.target_for_signature_path(path)
signature_paths << path
- when Project::Target
+ when project.target_for_source_path(path)
target_paths << path
end
end
files = target_paths + signature_paths
@@ -154,16 +154,18 @@
client_writer.write({ method: "$/ping", id: ping_guid, params: {}})
wait_for_response_id(reader: client_reader, id: ping_guid)
request_guid = master.fresh_request_id()
progress = master.work_done_progress(request_guid)
- request = Server::Master::TypeCheckRequest.new(guid: request_guid, progress: progress)
+ request = Server::TypeCheckController::Request.new(guid: request_guid, progress: progress)
target_paths.each do |path|
- request.code_paths << project.absolute_path(path)
+ target = project.target_for_source_path(path) or next
+ request.code_paths << [target.name, project.absolute_path(path)]
end
signature_paths.each do |path|
- request.signature_paths << project.absolute_path(path)
+ target = project.target_for_signature_path(path) or next
+ request.signature_paths << [target.name, project.absolute_path(path)]
end
request.needs_response = true
master.start_type_check(request: request, last_request: nil, report_progress_threshold: 0)