steep 1.8.1 → 1.8.3

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: 1619c69c7c85bbe5f0dffc4826aabf3e5a4ffa46c4eba61bab5a47ef29957d65
4
- data.tar.gz: 25540890ecd3d6b7dfa2cd280c65da59b7ec65e520942fa09175908d3bfe124a
3
+ metadata.gz: d97696cd49dd790a9b26f7682c1a1afc930ae0e16015b68f0a5b171851551f66
4
+ data.tar.gz: f2bb9e1a958fe0da3c8b92cf3710bbaeb2eaa6267e38717d46727583e4322638
5
5
  SHA512:
6
- metadata.gz: 3715058e9bf76839a0072e3f5e01fbcce25913e0a23b03ae645644b8c88f0f5160264ce3aa989c391a3b81ee04c7104670f0c77ce3c8192a847909c6f4e8fa9d
7
- data.tar.gz: 759e541a4444b02c2c86a8adbab2c606e667010c427146d4e74a61d422ddd55ce70ef30953d1ad94a7f1afea0a216f9e6198ffab71693b0bb7370819cc52707e
6
+ metadata.gz: 69365a7f7bd5919a26bd769c7fa800b51845a93d7dbdbd5c436e72a510098168dbc3ed3d9699399b2a8f0d16f9066d0d3e0ffff835fef0bcf9bce96cfd04d8bf
7
+ data.tar.gz: 5de2dbf818393ec2544a189062f0cad66f5c1b348543ff58861f96f65db53aa55e4e9928f1898ae6afd386116124d4b8554df3180983afe771b6c46f1d77ac3f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.8.3 (2024-10-29)
4
+
5
+ ### Type checker core
6
+
7
+ * Fix untyped hash typing ([#1299](https://github.com/soutaro/steep/pull/1299), Backport in [#1301](https://github.com/soutaro/steep/pull/1301))
8
+
9
+ ### Language server
10
+
11
+ * Handle file deletion notification ([#1300](https://github.com/soutaro/steep/pull/1300), Backport in [#1301](https://github.com/soutaro/steep/pull/1301))
12
+
13
+ ## 1.8.2 (2024-10-24)
14
+
15
+ ### Language server
16
+
17
+ * Ignore `didChangeWatchedFiles notification` for open files ([#1290](https://github.com/soutaro/steep/pull/1290))
18
+
3
19
  ## 1.8.1 (2024-10-08)
4
20
 
5
21
  ### Language server
@@ -702,28 +702,37 @@ module Steep
702
702
  end
703
703
 
704
704
  when "workspace/didChangeWatchedFiles"
705
+ updated_watched_files = [] #: Array[Pathname]
706
+
705
707
  message[:params][:changes].each do |change|
706
708
  uri = change[:uri]
707
709
  type = change[:type]
708
710
 
709
- path = PathHelper.to_pathname(uri) or next
711
+ path = PathHelper.to_pathname!(uri)
710
712
 
711
713
  unless controller.priority_paths.include?(path)
714
+ updated_watched_files << path
715
+
712
716
  controller.push_changes(path)
713
717
 
714
718
  case type
715
- when 1, 2
719
+ when LSP::Constant::FileChangeType::CREATED, LSP::Constant::FileChangeType::CHANGED
716
720
  content = path.read
717
- when 4
718
- # Deleted
721
+ when LSP::Constant::FileChangeType::DELETED
719
722
  content = ""
720
723
  end
721
724
 
722
725
  content or raise
726
+
723
727
  broadcast_notification(CustomMethods::FileReset.notification({ uri: uri, content: content }))
724
728
  end
725
729
  end
726
730
 
731
+ if updated_watched_files.empty?
732
+ Steep.logger.info { "Exit from workspace/didChangeWatchedFiles notification because all of the changed files are already open" }
733
+ return
734
+ end
735
+
727
736
  if typecheck_automatically
728
737
  start_type_checking_queue.execute do
729
738
  job_queue.push(
@@ -1434,10 +1434,10 @@ module Steep
1434
1434
  case hint
1435
1435
  when AST::Types::Any, AST::Types::Top, AST::Types::Void
1436
1436
  # ok
1437
- when hint == pair.type
1438
- # ok
1439
1437
  else
1440
- pair.constr.typing.add_error Diagnostic::Ruby::FallbackAny.new(node: node)
1438
+ unless hint == pair.type
1439
+ pair.constr.typing.add_error Diagnostic::Ruby::FallbackAny.new(node: node)
1440
+ end
1441
1441
  end
1442
1442
  end
1443
1443
  end
@@ -5054,7 +5054,7 @@ module Steep
5054
5054
  if (type_, constr = yield(type, constr))
5055
5055
  constr.check_relation(sub_type: type_, super_type: type).then do
5056
5056
  constr = constr.save_typing
5057
- return Pair.new(type: type, constr: constr)
5057
+ return Pair.new(type: type_, constr: constr)
5058
5058
  end
5059
5059
  end
5060
5060
  end
data/lib/steep/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Steep
2
- VERSION = "1.8.1"
2
+ VERSION = "1.8.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steep
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-08 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser