123456789_123456789_123456789_123456789_123456789_

CHANGELOG

master

2.7.0 (2022-10-07)

Signature updates

2.7.0.pre.3 (2022-10-06)

Signature updates

2.7.0.pre.2 (2022-09-20)

Signature updates

Library changes

Miscellaneous

2.7.0.pre.1 (2022-09-02)

See Release Note 2.7 for the highlights of this release.

Signature updates

Language updates

Library changes

rbs prototype

Miscellaneous

2.6.0 (2022-06-22)

RBS 2.6 ships with rbs prototype commands improvements and signature updates. New minitest RBS definitions will help you to type check your tests.

Signature updates

Library changes

rbs prototype

Miscellaneous

2.5.1 (2022-06-19)

This is a maintenance release mainly to fix errors detected in CI of ruby/ruby. Nothing changed related to the users of RBS gem.

Miscellaneous

2.5.0 (2022-05-20)

This is a minor release with tuple type/record type syntax updates and rbs prototype improvements.

Signature updates

Language updates

Library changes

rbs prototype

2.4.0 (2022-05-08)

This is a minor release with some signature updates, prototype rb improvement, and test fixes.

Signature updates

rbs prototype

Miscellaneous

2.3.2 (2022-04-06)

Library changes

Miscellaneous

2.3.1 (2022-04-05)

Library changes

rbs prototype

2.3.0 (2022-04-01)

Signature updates

Library changes

rbs prototype

rbs collection

Miscellaneous

2.2.2 (2022-02-22)

Signature updates

2.2.1 (2022-02-22)

Library changes

2.2.0 (2022-02-22)

RBS 2.2 ships with a new syntax to specify the visibility of a method per definition bases.

class Foo
  private def hello: () -> void

  private attr_accessor world: String
end

It also changes the semantics of self? method. It defines both public singleton method and private instance method, which is equivalent to module_function.

Signature updates

Language updates

Library changes

Miscellaneous

2.1.0 (2022-02-02)

RBS 2.1 is a release to deliver the types and documents of the new and updated methods of Ruby 3.1.

Signature updates

Library changes

2.0.0 (2021-12-24)

Bounded Generics

RBS 2.0 ships with bounded generics, which improves the expressiveness of the language by adding a new syntax to define constraints on type parameters.

class PrettyPrint[T < _Output]
  interface _Output
    def <<: (String) -> void
  end

  attr_reader output: T

  def initialize: (T output) -> void
end

This is the motivating example I found in the prettyprint library. The #initialize receives a object of type T and it must have #<< method. This is defined with < _Output syntax in the example. It means T has to be compatible with _Output interface. PrettyPrint[String] is okay, but PrettyPrint[Integer] is a type error.

See the PR for details.

RBS Collection manager

RBS Collection feature is generally available on RBS 2.0. In short, it is Bundler for RBS. You can manage RBSs of standard libraries and third party gems with rbs collection subcommand.

$ rbs collection init
created: rbs_collection.yaml

# The `install` command set up RBS files and creates `rbs_collection.lock.yaml` file
$ rbs collection install
Installing actionpack:6.0 (actionpack@ce6664cec73)
(...snip...)
Using tsort:0 (/path/to/rbs-2.0.0/stdlib/tsort/0)
It's done! 21 gems' RBSs now installed.

# Now you can use `rbs`, `typeprof` and `steep` commands with the dependencies out of the box!
$ rbs validate
$ typeprof app.rb
$ steep check

RBS 2.0 also introduces manifest.yaml to declare the dependencies from your gems to standard libraries explicitly. See [the documentation]) for more information.

Breaking changes

This version contains a bug fix, which potentially breaks the compatibility with older versions. The super class names in class definitions are now resolved in outer context. It was an incompatibility with Ruby and this PR fixed the problem.

Signature updates

Language updates

Library changes

1.8.1 (2021-12-13)

Library changes

1.8.0 (2021-12-02)

RBS 1.8.0 ships with a language feature enhancement, generic type alias. You can define a type alias with type parameters now.

type list[T] = [T, list[T]] | nil  # Defines a list of type T

type int_list = list[Integer]      # List of Integer
type string_list = list[String]    # List of String

You can find the detail in the PR.

Signature updates

Language updates

1.7.1 (2021-11-18)

Signature updates

Library changes

Miscellaneous

1.7.0 (2021-11-11)

This version replaces ::RBS::Parser implementation from pure Ruby code based on Racc to C extension. It improves the RBS file parsing performance up to 5 times faster. :rocket:

When you want to change the parser/lexer, change the files under ext/rbs_extension directory and run rake compile to compile the extension.

Signature updates

Library changes

Miscellaneous

1.6.2 (2021-09-09)

Signature updates

Miscellaneous

1.6.1 (2021-09-05)

This is a minor release including test fixes.

Miscellaneous

1.6.0 (2021-09-05)

This release includes a preview of rbs collection commands, which is bundler for RBS. The command helps you manage RBS files from gem_rbs_collection or other repositories.

This feature is a preview, and any feedback is welcome!

Signature updates

Library changes

Miscellaneous

1.5.1 (2021-08-22)

Miscellaneous

1.5.0 (2021-08-22)

This release includes stdlib signature updates.

Signature updates

1.4.0 (2021-08-19)

This release includes feature enhancements including recursive type definition validation, improved compatibility of global variable names, and various method type updates.

Signature updates

Language updates

Library changes

1.3.3 (2021-07-28)

This release includes a minor update of resolv library RBS and a fix of test for ruby/ruby CI.

Signature updates

1.3.2 (2021-07-23)

This release is to fix a bug introduced by parser update in 1.3.0.

1.3.1 (2021-07-21)

This release is to fix a bug introduced by parser update in 1.3.0.

1.3.0 (2021-07-20)

Summary

RBS 1.3.0 includes bug fixes of the parser and class/module definition validations.

Signature updates

Library changes

Miscellaneous

1.2.1 (2021-05-27)

This release includes the following minor changes:

1.2.0 (2021-04-21)

Summary

RBS 1.2 ships with better support for AST/token locations and Locator utility class. The AST objects now keep the locations of tokens. The Locator class is to translate the text position (line and column) to semantic object at the location. The class allows to find if a text position is on the class name of a class declaration.

Signature updates

Language updates

Library changes

Miscellaneous

1.1.1 (2021-03-12)

Signature updates

1.1.0 (2021-03-08)

Summary

Errors are now organized by ::RBS::BaseError, ::RBS::ParsingError, ::RBS::LoadingError, and ::RBS::DefinitionError. The library users can rescue RBS related errors with ::RBS::BaseError, parsing errors with ::RBS::ParsingError, and other errors with ::RBS::LoadingError and RBS::DefinitionErrors.

Updating a part of environments are supported. Library users can remove declarations read from a set of files, adding new declarations, running name resolution related to the new decls, and deleting DefinitionBuilder caches related to the changes. See RBS::Environment#reject, RBS::Environment#resolve_type_names, ::RBS::AncestorGraph, and RBS::DefinitionBuilder#update.

RBS::DefinitionBuilder#build_singleton now returns definitions containing instance type, which had returned resolved class instance types. This is a breaking change, but we consider it a bug fix because RBS::DefinitionBuilder#build_instance has returned instance types and #build_singleton has returned class type.

Signature updates

Language updates

Library changes

Miscellaneous

1.0.6 (2021-02-17)

1.0.5 (2021-02-13)

1.0.4 (2021-01-31)

1.0.3 (2021-01-28)

1.0.2 (2021-01-28)

1.0.1 (2021-01-27)

1.0.0 (2020-12-24)

0.20.1 (2020-12-06)

0.20.0 (2020-12-06)

0.19.0 (2020-12-02)

0.18.1 (2020-12-01)

0.18.0 (2020-12-01)

0.17.0 (2020-11-14)

0.16.0 (2020-11-05)

0.15.0 (2020-11-02)

0.14.0 (2020-10-17)

0.13.1 (2020-10-09)

0.13.0 (2020-10-09)

0.12.2 (2020-09-17)

0.12.1 (2020-09-16)

This version is to improve Ruby 3 testing compatibility. Nothing changed for users.

0.12.0 (2020-09-15)

0.11.0 (2020-08-31)

0.10.0 (2020-08-10)

0.9.1 (2020-08-04)

0.9.0 (2020-08-03)

0.8.0 (2020-08-01)

0.7.0 (2020-07-20)

0.6.0 (2020-07-12)

0.5.0 (2020-07-04)

0.4.0 (2020-06-15)

0.3.1 (2020-05-22)

0.3.0 (2020-05-20)

0.2.0

0.1.0