-
Notifications
You must be signed in to change notification settings - Fork 227
Description
For editor support in the Ruby LSP, it'd be great if this were standardized by rbs. See also Shopify/ruby-lsp#1773
I see that there are deprecation signatures in RBS syntax that are generally standardized:
Line 100 in 031f319
| %a{deprecated} attr_reader extra_annotations: Array[AST::Annotation] |
But is there a way to do this in an inline RBS signature? Should there be? Should we consider a @deprecated tag at the start of a comment line to be the standard way to do this, to match YARD/JSDoc and all the gems that already use this syntax?
class Foo
# @deprecated Use #new_thing instead.
#: -> String
def old_thing
return 'bad'
end
#: -> String
def new_thing
return 'better'
end
endI see that there is one example of an inline comment for a deprecated method, in the tests, but I don't think it technically means anything here.
rbs/test/rbs/inline_parser_test.rb
Lines 1305 to 1306 in 031f319
| # @deprecated Use NEW_API instead | |
| OLD_API_URL = "http://old.example.com" |
I am very much looking forward to Inline RBS! :)