Giter Club home page Giter Club logo

Comments (9)

jasnow avatar jasnow commented on August 23, 2024

What happens when you run this: srb rbi suggest-typed

from sorbet-typed.

connorshea avatar connorshea commented on August 23, 2024

It's really weird that the bundler.rbi would cause that but not cause it in sorbet-typed itself :/

from sorbet-typed.

connorshea avatar connorshea commented on August 23, 2024

Are you on the latest version of sorbet? I'm not seeing this error :?

from sorbet-typed.

connorshea avatar connorshea commented on August 23, 2024

Oh it seems to happen if you have the bundler.rbi set to strong or strict. It won't error if it's set to true.

from sorbet-typed.

aisamanra avatar aisamanra commented on August 23, 2024

We've temporarily reverted the change that caused this—that way, we can figure out what caused this situation to arise in the first place before re-merging the PR.

from sorbet-typed.

connorshea avatar connorshea commented on August 23, 2024

I'm still confused as to where the Elem is supposed to be coming from :?

Also, if you want to get rid of the gem.rbi in your project you'll need to delete it yourself. Sorbet doesn't seem to delete files if they're in sorbet-typed, it only overwrites existing files or adds them.

from sorbet-typed.

connorshea avatar connorshea commented on August 23, 2024

ok, so it looks like Gem::Specification does indeed extend Enumerable in hidden.rbi, which would be why there's an issue that CI didn't pick up, because CI doesn't generate any hidden definitions.

class Gem::Specification
  extend ::Enumerable
end

So when I removed the explicit extend Enumerable for Specification in #92, it fixed the problem in CI but not when actually using Sorbet.

from sorbet-typed.

connorshea avatar connorshea commented on August 23, 2024

hm, actually this might happen regardless of whether gem.rbi is there? It seems to be entirely dependent on the typing level of bundler.rbi. So this problem is probably just caused by bundle exec srb rbi sorbet-typed not also running suggest-typed. At least, kind of.

from sorbet-typed.

panthomakos avatar panthomakos commented on August 23, 2024

Running suggest-typed downgrades the file to typed: true and resolves the issue. It seems as though that file should be able to have a higher strictness though?

from sorbet-typed.

Related Issues (17)

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.