Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dir.exist? typecheck issue #491

Open
Postur opened this issue Oct 14, 2021 · 6 comments
Open

Dir.exist? typecheck issue #491

Postur opened this issue Oct 14, 2021 · 6 comments

Comments

@Postur
Copy link

Postur commented Oct 14, 2021

image

image

For some reason my ruby documentation does not allow the passing of an argument to Dir.exist?

Dir.exist? should take an argument following the ruby docs (2.7.2):

image

@Postur
Copy link
Author

Postur commented Oct 19, 2021

Any help would be appreciated

@castwide
Copy link
Owner

Confirmed. I'm still trying to determine the root cause, but I should be able to repair it with a core fill. (Side note: the problem is already resolved in the RBS version of core documentation.)

@Postur
Copy link
Author

Postur commented Oct 20, 2021

how to upgrade to RBS branch?

@castwide
Copy link
Owner

Since the RBS branch is unreleased and still in development, you'd have to either 1) build and install your own gem from a clone of the branch, or 2) specify the branch in your Gemfile, e.g., gem 'solargraph', github: 'castwide/solargraph', branch: 'rbs'

Note that RBS support is not yet stable, so I don't recommend using it unless you're specifically interested in testing and troubleshooting it.

@kamaradclimber
Copy link

@castwide, would you have an example of what a "core fill" is? I would be glad to submit a PR for this.

@castwide
Copy link
Owner

@kamaradclimber Solargraph::YardMap::CoreFills contains overrides that fill some of the gaps in core documentation. I expected that the override for Dir.exist? should look something like this:

        Override.from_comment('Dir.exist?', %(
@overload exist?(file_name)
  @param file_name [String]
  @return [Boolean]
        )),

Unfortunately, that doesn't appear to work. Not sure what the problem is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants