solargraph 0.55.0 → 0.55.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8e98755e559a9524b7d057c860e1ebb6d8a46eeb73dd567744f7562a4d49a64
4
- data.tar.gz: 33943305fcf0c4c534fd4abf5eb24a937f6390021e681017296aac7bb9546592
3
+ metadata.gz: d2f834e0f42bbdee3defc50d5365e754c168a7ccfe9f5b9b059013dc2a5221b3
4
+ data.tar.gz: 67abd2be10bd9562c53db394d13da52ae76016814bc3d3d1b17cb2010c645851
5
5
  SHA512:
6
- metadata.gz: 37c0b331d67d299a865e4201c030dec6c1fd4ca14955012d702a44849bece0497c70449a3594ce8cdfe56669b93fbc80d1b291331a540453409a990344464ac1
7
- data.tar.gz: c91397eeb5d2f10c551e97a741acb9a1e8fbae371b810bf375cc6024fc5985d6e2e581fb1d39c62ba9dd7f71b2cc6fa0ca801fcb74c89b5b8717beeaf8af10f0
6
+ metadata.gz: dd2e5c2424a217ba140cee3561bf007fd71f0fbfb0810a00f4d45bbb03c95a98cb9a0f5efc43bc31166e5e68e8009ac15f3843ed4144c990d23811c6540c6207
7
+ data.tar.gz: 306eeaf5080e35f9ab04841e1b349c94bffcf56d183487b574718c3561fbfd74742667f839ad6cdc6971594ef16ff65b84851341b5ac92e606edb3898e9a6fbf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.55.1 - June 8, 2025
2
+ - Fix inline Struct definition (#962)
3
+ - Ensure DocMap requires bundler when loading gemspecs (#963)
4
+ - DelegatedMethod improvements (#953)
5
+
1
6
  ## 0.55.0 - June 3, 2025
2
7
  - Flow-sensitive typing - automatically downcast from is_a? calls (#856)
3
8
  - Tuple enabler: infer literal types and use them for signature selection (#836)
@@ -25,7 +25,12 @@ module Solargraph
25
25
  def valid?(node)
26
26
  return false unless node&.type == :casgn
27
27
  return false if node.children[2].nil?
28
- struct_node = node.children[2].children[0]
28
+
29
+ struct_node = if node.children[2].type == :block
30
+ node.children[2].children[0]
31
+ else
32
+ node.children[2]
33
+ end
29
34
 
30
35
  struct_definition_node?(struct_node)
31
36
  end
@@ -43,7 +48,11 @@ module Solargraph
43
48
 
44
49
  # @return [Parser::AST::Node]
45
50
  def struct_node
46
- node.children[2].children[0]
51
+ if node.children[2].type == :block
52
+ node.children[2].children[0]
53
+ else
54
+ node.children[2]
55
+ end
47
56
  end
48
57
  end
49
58
  end
@@ -134,6 +134,13 @@ module Solargraph
134
134
  return nil if path.empty?
135
135
 
136
136
  if path == 'bundler/require'
137
+ # @todo Quick fix for cases when Solargraph is running without Bundler.
138
+ # The next goal is to enable loading of external bundles, i.e.,
139
+ # finding gems that are defined in the workspace's bundle when
140
+ # Solargraph is running in a different environment.
141
+ # See https://github.com/castwide/vscode-solargraph/issues/279
142
+ require 'bundler'
143
+
137
144
  # find only the gems bundler is now using
138
145
  gemspecs = Bundler.definition.locked_gems.specs.flat_map do |lazy_spec|
139
146
  logger.info "Handling #{lazy_spec.name}:#{lazy_spec.version} from #{path}"
@@ -24,7 +24,24 @@ module Solargraph
24
24
  @receiver_method_name = receiver_method_name
25
25
  end
26
26
 
27
- %i[comments parameters return_type location].each do |method|
27
+ def inner_desc
28
+ "#{name} => #{@receiver_chain}##{@receiver_method_name}"
29
+ end
30
+
31
+ def location
32
+ return super if super
33
+
34
+ @resolved_method&.send(:location)
35
+ end
36
+
37
+
38
+ def type_location
39
+ return super if super
40
+
41
+ @resolved_method&.send(:type_location)
42
+ end
43
+
44
+ %i[comments parameters return_type signatures].each do |method|
28
45
  define_method(method) do
29
46
  @resolved_method ? @resolved_method.send(method) : super()
30
47
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Solargraph
4
- VERSION = '0.55.0'
4
+ VERSION = '0.55.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solargraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.55.0
4
+ version: 0.55.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-03 00:00:00.000000000 Z
11
+ date: 2025-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backport