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

Show location of type by method command #1537

Merged
merged 1 commit into from Sep 27, 2023
Merged

Conversation

ksss
Copy link
Collaborator

@ksss ksss commented Sep 22, 2023

I propose not only displaying type definitions but also indicating the location where the definition is written. This would help users quickly locate the source of type definitions and save them time.

Example:

$ bundle exec rbs -r bigdecimal method Float -
::Float#-
  defined_in: ::Float
  implementation: ::Float
  accessibility: public
  types:
      (::BigDecimal) -> ::BigDecimal   at /Users/ksss/src/github.com/ksss/rbs/stdlib/bigdecimal/0/big_decimal.rbs:1562:9...1562:35
    | (::Complex) -> ::Complex         at /Users/ksss/src/github.com/ksss/rbs/core/float.rbs:179:9...179:29
    | (::Numeric) -> ::Float           at /Users/ksss/src/github.com/ksss/rbs/core/float.rbs:180:9...180:27

Example:

```
$ bundle exec rbs -r bigdecimal method Float -
::Float#-
  defined_in: ::Float
  implementation: ::Float
  accessibility: public
  types:
      (::BigDecimal) -> ::BigDecimal   at /Users/ksss/src/github.com/ksss/rbs/stdlib/bigdecimal/0/big_decimal.rbs:1562:9...1562:35
    | (::Complex) -> ::Complex         at /Users/ksss/src/github.com/ksss/rbs/core/float.rbs:179:9...179:29
    | (::Numeric) -> ::Float           at /Users/ksss/src/github.com/ksss/rbs/core/float.rbs:180:9...180:27
```
@soutaro soutaro added this to the RBS 3.3 milestone Sep 27, 2023
Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🎉

@soutaro soutaro added this pull request to the merge queue Sep 27, 2023
Merged via the queue into ruby:master with commit a4e4fb0 Sep 27, 2023
23 checks passed
@ksss ksss deleted the command-method branch September 27, 2023 08:51
@soutaro soutaro added the Released PRs already included in the released version label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released PRs already included in the released version
Development

Successfully merging this pull request may close these issues.

None yet

2 participants