safe_dump function missing from Psych
As experienced here: https://github.com/castwide/solargraph/issues/959
the safe_dump method is not found; According to a comment on the above issue, this is due to it missing from RBS; maybe other methods are also missing.
Could this be updated/fixed so all methods in Psych module are found/documented?
It’s a simple example, but I believe it can still serve as a useful reference. Since it includes internal methods as well, I don’t believe we need to provide all of them.
$ bundle exec rbs -r json -r psych prototype runtime --todo Psych
Generating prototypes with `--todo` option is experimental
module Psych
def self.add_builtin_type: (untyped type_tag) { (*untyped) -> untyped } -> untyped
def self.add_domain_type: (untyped domain, untyped type_tag) { (*untyped) -> untyped } -> untyped
def self.add_tag: (untyped tag, untyped klass) -> untyped
def self.config: () -> untyped
def self.domain_types: (*untyped args, **untyped) { (*untyped) -> untyped } -> untyped
def self.domain_types=: (*untyped args, **untyped) { (*untyped) -> untyped } -> untyped
def self.dump_stream: (*untyped objects) -> untyped
def self.dump_tags: (*untyped args, **untyped) { (*untyped) -> untyped } -> untyped
def self.dump_tags=: (*untyped args, **untyped) { (*untyped) -> untyped } -> untyped
def self.libyaml_version: () -> untyped
def self.load_stream: (untyped yaml, ?filename: untyped, ?fallback: untyped, **untyped) -> untyped
def self.load_tags: (*untyped args, **untyped) { (*untyped) -> untyped } -> untyped
def self.load_tags=: (*untyped args, **untyped) { (*untyped) -> untyped } -> untyped
def self.parse: (untyped yaml, ?filename: untyped) -> untyped
def self.parse_file: (untyped filename, ?fallback: untyped) -> untyped
def self.parse_stream: (untyped yaml, ?filename: untyped) { (*untyped) -> untyped } -> untyped
def self.parser: () -> untyped
def self.remove_type: (untyped type_tag) -> untyped
def self.safe_dump: (untyped o, ?untyped io, ?untyped options) -> untyped
def self.safe_load_file: (untyped filename, **untyped) -> untyped
def self.unsafe_load_file: (untyped filename, **untyped) -> untyped
LIBYAML_VERSION: ::String
LOADER_VERSION: ::String
VERSION: ::String
end
@ksss does the above output signify that it should work? When I run that command locally, I get the same output as you, including the safe_dump function.. Or does this mean: "here is a list of things we haven't done yet, no types for you!"
This is a list of methods that have Ruby methods but no types provided yet. They are shown as prototypes so that types can be added immediately.