tapioca 0.16.10 → 0.16.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b1ddf8615a19929d81d7662c300a28ee8d49d08d7ba984fdaa7644bf70d5dfb
4
- data.tar.gz: 4f2a79db13ce4a0e7614178d14423f5bd0fded127a6c5b6d0503bf7e2d73df7b
3
+ metadata.gz: 05e19aeab9d997df21ef0b042afe97b1fdcca0b7ce148ecb4f05b0d14b792294
4
+ data.tar.gz: '09a81f179ccc96606f97bfffe3b07a113315ace4adf5d312998f6caae674cd6e'
5
5
  SHA512:
6
- metadata.gz: a03a8d4866b5faf46af5cea289d4d7087540d58ee5b4eb759cb30cc23c540cc037c03bdd937cdf73e3f955407b2a47865600297fafe6b495e786e64b99f38942
7
- data.tar.gz: 3a5bf689b47f198577480420b9ea0c1294a6c2170df0f5ba9a6e170a8f60b3d2de73827053f4b33002f1a6ae9f2501a73b70590c250c8306b86d52b244aa7f36
6
+ metadata.gz: ec69dd3c33275760ebd701d92335da1d0afd7da6e8908887ef3622a836fad09d3e1752f2dedab1efc20fb805065968cea6ec7980cc0abd4561318529a45a6559
7
+ data.tar.gz: 1258bd043e9edb53e08afcc78fecdcbc5cc228d0a069beb31c4b2c3ef818d894d16751e2aa24f8e1a6c0b7eb144cc7cb47aba1aa834fa86a6502dc1bd9577649
@@ -78,7 +78,7 @@ module RubyLsp
78
78
 
79
79
  sig { override.returns(String) }
80
80
  def version
81
- "0.1.2"
81
+ "0.1.3"
82
82
  end
83
83
 
84
84
  sig { params(changes: T::Array[{ uri: String, type: Integer }]).void }
@@ -131,15 +131,22 @@ module Tapioca
131
131
 
132
132
  sig { returns(Tapioca::Dsl::Pipeline) }
133
133
  def create_pipeline
134
+ error_handler = if @lsp_addon
135
+ ->(error) {
136
+ say(error)
137
+ }
138
+ else
139
+ ->(error) {
140
+ say_error(error, :bold, :red)
141
+ }
142
+ end
134
143
  Tapioca::Dsl::Pipeline.new(
135
144
  requested_constants:
136
145
  constantize(@requested_constants) + constantize(constants_from_requested_paths, ignore_missing: true),
137
146
  requested_paths: @requested_paths,
138
147
  requested_compilers: constantize_compilers(@only),
139
148
  excluded_compilers: constantize_compilers(@exclude),
140
- error_handler: ->(error) {
141
- say_error(error, :bold, :red)
142
- },
149
+ error_handler: error_handler,
143
150
  skipped_constants: constantize(@skip_constant, ignore_missing: true),
144
151
  number_of_workers: @number_of_workers,
145
152
  compiler_options: @compiler_options,
@@ -78,6 +78,7 @@ module Tapioca
78
78
  No classes/modules can be matched for RBI generation.
79
79
  Please check that the requested classes/modules include processable DSL methods.
80
80
  ERROR
81
+ raise Thor::Error, ""
81
82
  end
82
83
 
83
84
  if defined?(::ActiveRecord::Base) && constants_to_process.any? { |c| ::ActiveRecord::Base > c }
@@ -94,8 +95,12 @@ module Tapioca
94
95
  blk.call(constant, rbi)
95
96
  end
96
97
 
97
- errors.each do |msg|
98
- report_error(msg)
98
+ if errors.any?
99
+ errors.each do |msg|
100
+ report_error(msg)
101
+ end
102
+
103
+ raise Thor::Error, ""
99
104
  end
100
105
 
101
106
  result.compact
@@ -216,11 +221,10 @@ module Tapioca
216
221
  file
217
222
  end
218
223
 
219
- sig { params(error: String).returns(T.noreturn) }
224
+ sig { params(error: String).void }
220
225
  def report_error(error)
221
226
  handler = error_handler
222
227
  handler.call(error)
223
- exit(1)
224
228
  end
225
229
 
226
230
  sig { void }
@@ -14,11 +14,10 @@ module Tapioca
14
14
  sig { override.params(event: ScopeNodeAdded).void }
15
15
  def on_scope(event)
16
16
  symbol = event.symbol
17
- return if @pipeline.symbol_in_payload?(symbol) && event.node.empty?
17
+ constant = event.constant
18
18
 
19
19
  prefix = symbol == "Object" ? "" : symbol
20
20
 
21
- constant = event.constant
22
21
  constants_of(constant).sort.uniq.map do |constant_name|
23
22
  name = "#{prefix}::#{constant_name}"
24
23
  subconstant = constantize(name)
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Tapioca
5
- VERSION = "0.16.10"
5
+ VERSION = "0.16.11"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapioca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.10
4
+ version: 0.16.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ufuk Kayserilioglu
@@ -10,7 +10,7 @@ authors:
10
10
  - Peter Zhu
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2025-02-12 00:00:00.000000000 Z
13
+ date: 2025-02-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: benchmark