Comments (7)
I close this ticket as @pocke said this issue was fixed in the side of rbs gem. Thank you for your report!
from typeprof.
Thank you for your report. Your repro works well for me. Could you elaborate how to reproduce the issue?
$ git clone https://github.com/okuramasafumi/typeprof-bug-repro
Cloning into 'typeprof-bug-repro'...
cd remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 10 (delta 1), reused 10 (delta 1), pack-reused 0
Receiving objects: 100% (10/10), done.
Resolving deltas: 100% (1/1), done.
$ cd typeprof-bug-repro/
$ bundle
Bundler 2.4.0.dev is running, but your lockfile was generated with 2.3.6. Installing Bundler 2.3.6 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.3.6
Installing bundler 2.3.6
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 2.3.6
Fetching rbs 2.2.2
Installing rbs 2.2.2 with native extensions
Using typeprof 0.21.2
Bundle complete! 2 Gemfile dependencies, 3 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ bundle exec rbs collection install
Using json:0 (/home/mame/work/ruby/local/lib/ruby/gems/3.2.0/gems/rbs-2.2.2/stdlib/json/0)
It's done! 1 gems' RBSs now installed.
$ bundle exec typeprof foo.rb
# TypeProf 0.21.2
# Classes
class Foo
def bar: -> String
end
from typeprof.
I noticed that I saw Using rbs:2.2.2 (/Users/okuramasafumi/.gem/ruby/3.1.1/gems/rbs-2.2.2/sig)
line when I execute bundle exec rbs collection install
. That's the only different from your output.
from typeprof.
I noticed that I saw
Using rbs:2.2.2 (/Users/okuramasafumi/.gem/ruby/3.1.1/gems/rbs-2.2.2/sig)
line when I executebundle exec rbs collection install
. That's the only different from your output.
The line means rbs collection uses rbs gem's .rbs
files for typeprof.
It does not appear because the rbs_collection.yaml
has an entry to ignore rbs gem's .rbs
files.
https://github.com/okuramasafumi/typeprof-bug-repro/blob/4db5ab4f9021754ca48da87121b137cea8a26b28/rbs_collection.yaml#L11-L13
I guess your configuration file doesn't have the ignore
entry, could you confirm it?
from typeprof.
I guess your configuration file doesn't have the ignore entry, could you confirm it?
I included all files in the repo, where's my configuration?
from typeprof.
I guessed you used something else, such as not committed file, in another repo, etc.
RBS reads rbs_collection.yaml and rbs_collection.lock.yaml in the current directory, so we need to check them.
By the way, I guess I found the cause of the difference between us 🙈
After I executed rbs collection install
, the lockfile has a difference.
$ git diff rbs_collection.lock.yaml
diff --git a/rbs_collection.lock.yaml b/rbs_collection.lock.yaml
index 3736270..6a321ef 100644
--- a/rbs_collection.lock.yaml
+++ b/rbs_collection.lock.yaml
@@ -10,7 +10,3 @@ gems:
version: '0'
source:
type: stdlib
-- name: rbs
- version: 2.2.2
- source:
- type: rubygems
And I can reproduce the problem by resetting the difference.
In order to fix the reproducing repo, we need to remove the entry to ignore rbs gem, like the following:
$ git diff rbs_collection.yaml
diff --git a/rbs_collection.yaml b/rbs_collection.yaml
index 93de20f..a7e42e7 100644
--- a/rbs_collection.yaml
+++ b/rbs_collection.yaml
@@ -9,6 +9,4 @@ sources:
path: .gem_rbs_collection
gems:
- - name: rbs
- ignore: true
- name: json
Then we can reproduce the problem 🙌
I think this is ruby/rbs's problem. I'll try fixing it.
You can also suppress this problem by adding the entry to ignore rbs gem to rbs_collection.yaml
and executing rbs collection install
to sync the lockfile.
Thanks for reporting it!
from typeprof.
@pocke Thanks for helping me, I now understand how lockfile works.
I'll keep this issue open until the problem in RBS resolved, thank you!
from typeprof.
Related Issues (20)
- undefined method: singleton HOT 1
- A feature to ignore errors on a specified line
- Updating a Rails app to Ruby 3.1.2 breaks typrof HOT 1
- Importing RBS::AST::Members::ClassInstanceVariable is not supported yet
- Typing of dynamic methods and variables
- Fail to start TypeProf for IDE on zsh
- Typeprof failed to start when rbs_collection.lock.yaml doesn't exist.
- tests not working for 0.21.7 on ruby 3.1 HOT 1
- test dependency sider/goodcheck is gone HOT 1
- Tests for version 0.21.8 are failing in ruby 3.2.2 with rbs 2.8.2
- Incorrect signature type with conditional implicit return HOT 3
- Summarizing the Prism AST Coverage
- Now `tool/dog_bench.rb` cannot handle `core/ast/base.rb` HOT 1
- Type `::Range` is generic but used as a non generic type
- Methods defined in a Struct.new block end up on parent module
- `include Enumerable` causes error
- Instance variables are sometimes incorrectly added to `Object` HOT 1
- Instance variables in subclasses sometimes are defined incorrectly HOT 2
- vscode error: typeprof running on wrong ruby HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typeprof.