Git Product home page Git Product logo

Comments (7)

mame avatar mame commented on July 30, 2024 1

I close this ticket as @pocke said this issue was fixed in the side of rbs gem. Thank you for your report!

from typeprof.

mame avatar mame commented on July 30, 2024

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.

okuramasafumi avatar okuramasafumi commented on July 30, 2024

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.

pocke avatar pocke commented on July 30, 2024

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.

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.

okuramasafumi avatar okuramasafumi commented on July 30, 2024

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.

pocke avatar pocke commented on July 30, 2024

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.

okuramasafumi avatar okuramasafumi commented on July 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.