Skip to content

Commit

Permalink
Merge pull request #42 from ksss/dev-exp
Browse files Browse the repository at this point in the history
Improve development experience
  • Loading branch information
tompng authored Dec 3, 2024
2 parents 308edfd + 2f3bb84 commit ff75598
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/repl_type_completor/types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ def self.load_rbs_builder
gem_sig_path = File.expand_path("#{spec.gem_dir}/sig")
loader.add(library: spec.name, version: spec.version) if Dir.exist?(gem_sig_path) && expanded_sig_path != gem_sig_path
end
@rbs_builder = RBS::DefinitionBuilder.new env: RBS::Environment.from_loader(loader).resolve_type_names
env = RBS::Environment.from_loader(loader)
# [Hack] Monkey patch for improving development experience
def env.resolve_declaration(*, **)
Thread.pass
super
end
@rbs_builder = RBS::DefinitionBuilder.new env: env.resolve_type_names
rescue LoadError, StandardError => e
@rbs_load_error = e
nil
Expand Down

0 comments on commit ff75598

Please sign in to comment.