typeprof 0.21.2 → 0.21.3

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: 9cfc98929d3481526809f92f41edd0abe30d82aaab6f1e1e95d574c74e1cee9b
4
- data.tar.gz: 895a3f4949b010d2809e32016fec9e7597ae6b5e29175448b668ede33ab20b99
3
+ metadata.gz: 87b881146ffc3f78049ac01775f0bd6cae8efeec13a77da7eab2a61e3027a802
4
+ data.tar.gz: 61507f6552b6440fa58ea298ed80956a32e97b149b46d0969a594e8d1b0920bc
5
5
  SHA512:
6
- metadata.gz: 736ebc69c1715474973c514ca0e013991575732bee3549b7ac80865264bf3fde42065b1e00b408d3a543a8730030979e891be0427f73a297808bfd890c5698f0
7
- data.tar.gz: 6bbe63293cfa70dc393e6a97d7a761865ed76a4cbb12a95a19134649079849a82510671e2d1661c55319958040f30c70f2ab06f255a28af5d0cbb6eba96ac0f0
6
+ metadata.gz: dce6a8c024aa553089224545ca89a6148a590390791f9411b6a70791ad23cb70a9e97d4405264882c3cfccc8cd30e69443cc6330cb81c33f996fa2363dc0369a
7
+ data.tar.gz: c6f6e02dc30a6c8b7ecbee01f05f171b467a95526b4541173b303803287ea208eb816223353a704866b7f0b87b266462560554bb997bdbe67d3b5c9373385a4f
@@ -7,10 +7,10 @@ jobs:
7
7
  strategy:
8
8
  fail-fast: false
9
9
  matrix:
10
- ruby-version: [2.7, 3.0,head]
10
+ ruby-version: [2.7, 3.0, 3.1, head]
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  with:
15
15
  submodules: true
16
16
  - name: Set up Ruby
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- typeprof (0.21.2)
4
+ typeprof (0.21.3)
5
5
  rbs (>= 1.8.1)
6
6
 
7
7
  GEM
@@ -10,15 +10,15 @@ GEM
10
10
  coverage-helpers (1.0.0)
11
11
  docile (1.4.0)
12
12
  power_assert (2.0.1)
13
- rake (13.0.1)
14
- rbs (2.0.0)
13
+ rake (13.0.6)
14
+ rbs (2.6.0)
15
15
  simplecov (0.21.2)
16
16
  docile (~> 1.1)
17
17
  simplecov-html (~> 0.11)
18
18
  simplecov_json_formatter (~> 0.1)
19
19
  simplecov-html (0.12.3)
20
- simplecov_json_formatter (0.1.3)
21
- stackprof (0.2.17)
20
+ simplecov_json_formatter (0.1.4)
21
+ stackprof (0.2.19)
22
22
  test-unit (3.5.3)
23
23
  power_assert
24
24
 
@@ -92,7 +92,7 @@ module TypeProf
92
92
  aargs = scratch.globalize_type(aargs, caller_env, caller_ep)
93
93
  subst = aargs.consistent_with_method_signature?(@msig)
94
94
  unless subst
95
- scratch.warn(caller_ep, "The arguments is not compatibile to RBS block")
95
+ scratch.warn(caller_ep, "The arguments is not compatible to RBS block")
96
96
  end
97
97
  # check?
98
98
  #subst = { Type::Var.new(:self) => caller_env.static_env.recv_ty }
data/lib/typeprof/lsp.rb CHANGED
@@ -5,6 +5,8 @@ require "uri"
5
5
  module TypeProf
6
6
  def self.start_lsp_server(config)
7
7
  if config.lsp_options[:stdio]
8
+ $stdin.binmode
9
+ $stdout.binmode
8
10
  reader = LSP::Reader.new($stdin)
9
11
  writer = LSP::Writer.new($stdout)
10
12
  # pipe all builtin print output to stderr to avoid conflicting with lsp
@@ -498,9 +500,11 @@ module TypeProf
498
500
  when "typeprof.enableSignature"
499
501
  @server.signature_enabled = true
500
502
  @server.send_request("workspace/codeLens/refresh")
503
+ respond(nil)
501
504
  when "typeprof.disableSignature"
502
505
  @server.signature_enabled = false
503
506
  @server.send_request("workspace/codeLens/refresh")
507
+ respond(nil)
504
508
  when "typeprof.createPrototypeRBS"
505
509
  class_kind, class_name, sig_str = @params[:arguments]
506
510
  code_range =
@@ -1,3 +1,3 @@
1
1
  module TypeProf
2
- VERSION = "0.21.2"
2
+ VERSION = "0.21.3"
3
3
  end
data/typeprof.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  # Specify which files should be added to the gem when it is released.
25
25
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
26
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
27
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(doc|test|spec|features|smoke|testbed)/}) }
27
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(doc|test|spec|features|smoke|testbed|vscode)/}) }
28
28
  end
29
29
  spec.bindir = "exe"
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typeprof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.2
4
+ version: 0.21.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke Endoh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-28 00:00:00.000000000 Z
11
+ date: 2022-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs
@@ -67,16 +67,6 @@ files:
67
67
  - tools/setup-insns-def.rb
68
68
  - typeprof-lsp
69
69
  - typeprof.gemspec
70
- - vscode/.gitignore
71
- - vscode/.vscode/launch.json
72
- - vscode/.vscodeignore
73
- - vscode/README.md
74
- - vscode/development.md
75
- - vscode/package-lock.json
76
- - vscode/package.json
77
- - vscode/sandbox/test.rb
78
- - vscode/src/extension.ts
79
- - vscode/tsconfig.json
80
70
  homepage: https://github.com/ruby/typeprof
81
71
  licenses:
82
72
  - MIT
@@ -98,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
88
  - !ruby/object:Gem::Version
99
89
  version: '0'
100
90
  requirements: []
101
- rubygems_version: 3.4.0.dev
91
+ rubygems_version: 3.3.7
102
92
  signing_key:
103
93
  specification_version: 4
104
94
  summary: TypeProf is a type analysis tool for Ruby code based on abstract interpretation
data/vscode/.gitignore DELETED
@@ -1,5 +0,0 @@
1
- /out
2
- node_modules
3
- .vscode/*
4
- !.vscode/launch.json
5
- *.vsix
@@ -1,16 +0,0 @@
1
- {
2
- "version": "0.1.0",
3
- "configurations": [
4
- {
5
- "name": "Launch Extension",
6
- "type": "extensionHost",
7
- "request": "launch",
8
- "runtimeExecutable": "${execPath}",
9
- "args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
10
- "stopOnEntry": false,
11
- "sourceMaps": true,
12
- "outFiles": [ "${workspaceRoot}/out/src/**/*.js" ],
13
- "preLaunchTask": "npm: vscode:prepublish"
14
- }
15
- ]
16
- }
data/vscode/.vscodeignore DELETED
@@ -1,7 +0,0 @@
1
- /sandbox
2
- .vscode/**
3
- /src
4
- **/*.ts
5
- **/*.js.map
6
- **/tsconfig.json
7
- development.md
data/vscode/README.md DELETED
@@ -1,22 +0,0 @@
1
- # Ruby TypeProf VSCode Integration
2
-
3
- *NOTE: This extenstion is very preliminary.*
4
-
5
- This is a VSCode extension to help you write Ruby code by using an code analyzer called [Ruby TypeProf](https://github.com/ruby/typeprof/) as a backend.
6
-
7
- ## How to use this extension
8
-
9
- *TBD*
10
-
11
- Requirements:
12
-
13
- 1. Use Ruby 3.1.0 or later, and TypeProf 0.20.0 or later
14
- 2. Add `gem "typeprof"` to your `Gemfile`, and execute `bundle install`
15
-
16
- Troubleshooting:
17
-
18
- *TBD*
19
-
20
- ## How to develop this extension
21
-
22
- See [development.md](https://github.com/ruby/typeprof/blob/master/development.md).
@@ -1,31 +0,0 @@
1
- # LSP client for vscode
2
-
3
- Note: this is under development
4
-
5
- ## How to run
6
-
7
- ```
8
- $ cd vscode
9
- $ npm install
10
- $ npx run tsc -p ./
11
- $ cd ..
12
- $ code --extensionDevelopmentPath=vscode/ .
13
- ```
14
-
15
- Alternatively, you can do it in vscode itself.
16
-
17
- ```
18
- $ cd vscode
19
- $ code
20
- ```
21
-
22
- And then press F5 to run another vscode with extension.
23
-
24
- ## How to release
25
-
26
- ```
27
- $ npm run package
28
- $ npx vsce publish
29
- ```
30
-
31
- See also: https://code.visualstudio.com/api/working-with-extensions/publishing-extension