solargraph 0.54.3 → 0.54.4

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: bfa5a38942b03bbc954c62e283a07144fd169467e82d29aedd549e0a122ad73e
4
- data.tar.gz: 9076b8982f53dffe42861873eab5f8fe654c4a2503af67c2fba1880625dee5e6
3
+ metadata.gz: 469236908941a1221785c7add8041544e118731b99e8a81b766856b96acbb307
4
+ data.tar.gz: 6f2cf614a67abd04e53bb3a30a5ce2bc51b6b9cac16c474818e959c1e4c582ab
5
5
  SHA512:
6
- metadata.gz: 66cad45bdab9c446a1bb25e29beabae7b6371f36270d23a36a48dd7c5b0347fb3239862b67bc30c4510b82d93ef97dee9656e3f80e242b1c281d17f86da782b6
7
- data.tar.gz: b34f32af68d295b41ac2ec48d7ec9defb832933c4825b2666791b51bd9050e11d06036b52d6200f4f2897f197aecdb2123d6a5c4256f6c87502b08d8eeda7f5c
6
+ metadata.gz: 22777792098e88c264a08e8a9785df73e00b1ed20fbfb4efe0988f9cb8aa5deec93ae520961672f2848ac7b2bf02fefccbb83a14e0c9092c2e18bd861d938f0b
7
+ data.tar.gz: f154c4badced68ac0ab43bfe43c380009787c424f909801da183fdaf63e9a818daf62eb7ddb904172b9f91957d634758732460aab317235bf163c9d26921f452
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.54.4 - May 14, 2025
2
+ - Delete files from Library hash (#932)
3
+ - Clip#define returns variable pins (#934, #933)
4
+
1
5
  ## 0.54.3 - May 13, 2025
2
6
  - Improve inspect()/desc()/to_s() methods for better debugging output (#913)
3
7
  - Fix generic resolution in Hash types (#906)
@@ -132,6 +132,7 @@ module Solargraph
132
132
  result = false
133
133
  filenames.each do |filename|
134
134
  detach filename
135
+ source_map_hash.delete(filename)
135
136
  result ||= workspace.remove(filename)
136
137
  end
137
138
  result
@@ -192,11 +193,7 @@ module Solargraph
192
193
  else
193
194
  mutex.synchronize do
194
195
  clip = api_map.clip(cursor)
195
- if cursor.assign?
196
- [Pin::ProxyType.new(name: cursor.word, return_type: clip.infer)]
197
- else
198
- clip.define.map { |pin| pin.realize(api_map) }
199
- end
196
+ clip.define.map { |pin| pin.realize(api_map) }
200
197
  end
201
198
  end
202
199
  rescue FileNotFoundError => e
@@ -89,21 +89,15 @@ module Solargraph
89
89
  elsif n.type == :const
90
90
  const = unpack_name(n)
91
91
  result.push Chain::Constant.new(const)
92
- elsif [:lvasgn, :ivasgn, :gvasgn, :cvasgn].include?(n.type)
93
- result.concat generate_links(n.children[1])
94
- elsif n.type == :lvar
92
+ elsif [:lvar, :lvasgn].include?(n.type)
95
93
  result.push Chain::Call.new(n.children[0].to_s)
96
- elsif n.type == :ivar
94
+ elsif [:ivar, :ivasgn].include?(n.type)
97
95
  result.push Chain::InstanceVariable.new(n.children[0].to_s)
98
- elsif n.type == :cvar
96
+ elsif [:cvar, :cvasgn].include?(n.type)
99
97
  result.push Chain::ClassVariable.new(n.children[0].to_s)
100
- elsif n.type == :gvar
98
+ elsif [:gvar, :gvasgn].include?(n.type)
101
99
  result.push Chain::GlobalVariable.new(n.children[0].to_s)
102
100
  elsif n.type == :or_asgn
103
- # @todo: Need a new Link class here that evaluates the
104
- # existing variable type with the RHS, and generates a
105
- # union type of the LHS alone if never nil, or minus nil +
106
- # RHS if it is nilable.
107
101
  result.concat generate_links n.children[1]
108
102
  elsif [:class, :module, :def, :defs].include?(n.type)
109
103
  # @todo Undefined or what?
@@ -8,8 +8,8 @@ module Solargraph
8
8
  include ParserGem::NodeMethods
9
9
 
10
10
  def process
11
- # variable not visible until next statement
12
- presence = Range.new(get_node_end_position(node), region.closure.location.range.ending)
11
+ here = get_node_start_position(node)
12
+ presence = Range.new(here, region.closure.location.range.ending)
13
13
  loc = get_node_location(node)
14
14
  locals.push Solargraph::Pin::LocalVariable.new(
15
15
  location: loc,
@@ -104,17 +104,6 @@ module Solargraph
104
104
  @string ||= source.string_at?(position)
105
105
  end
106
106
 
107
-
108
- # True if the cursor's chain is an assignment to a variable.
109
- #
110
- # When the chain is an assignment, `Cursor#word` will contain the
111
- # variable name.
112
- #
113
- # @return [Boolean]
114
- def assign?
115
- %i[lvasgn ivasgn gvasgn cvasgn].include? chain&.node&.type
116
- end
117
-
118
107
  # Get a cursor pointing to the method that receives the current statement
119
108
  # as an argument.
120
109
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Solargraph
4
- VERSION = '0.54.3'
4
+ VERSION = '0.54.4'
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.54.3
4
+ version: 0.54.4
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-05-13 00:00:00.000000000 Z
11
+ date: 2025-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backport