Skip to content

Commit

Permalink
Merge branch 'master' into swesterman/23-09-06/gc
Browse files Browse the repository at this point in the history
  • Loading branch information
sampersand authored Nov 16, 2023
2 parents c63a5e1 + 47a57ff commit dea3f9a
Show file tree
Hide file tree
Showing 117 changed files with 5,492 additions and 1,555 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
test:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
container_tag:
- master-nightly-focal
Expand All @@ -30,6 +31,9 @@ jobs:
job: stdlib_test
- container_tag: 3.1-dev-focal
job: stdlib_test
include:
- container_tag: master-nightly-focal
allow_failures: "true"
container:
image: rubylang/ruby:${{ matrix.container_tag }}
steps:
Expand Down Expand Up @@ -66,6 +70,7 @@ jobs:
- name: Run test
run: |
bundle exec rake ${{ matrix.job }}
continue-on-error: ${{ matrix.allow_failures == 'true' && (github.event_name == 'push' || github.event_name == 'merge_group') }}

windows:
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require: rubocop-rubycw
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0
DisabledByDefault: true
Exclude:
- 'vendor/bundle/**/*'
Expand Down
134 changes: 134 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,140 @@

## master

## 3.3.0 (2023-11-09)

### Library changes

* Stop exiting with error when syntax error detected during validation ([#1603](https://github.com/ruby/rbs/pull/1603))
* [rbs diff] Load dependencies from manifest.yaml ([#1602](https://github.com/ruby/rbs/pull/1602))
* [rbs diff] Resolve constants name ([#1601](https://github.com/ruby/rbs/pull/1601))

## 3.3.0.pre.2 (2023-11-02)

### Signature updates

* net/smtp ([#1560](https://github.com/ruby/rbs/pull/1560))
* open-uri ([#1592](https://github.com/ruby/rbs/pull/1592))
* `Set` ([#1595](https://github.com/ruby/rbs/pull/1595))

### Library changes

* Fixup validation ([#1596](https://github.com/ruby/rbs/pull/1596))
* Print type syntax errors instead of raising error ([#1594](https://github.com/ruby/rbs/pull/1594))

#### rbs prototype

* Fix error when MASGN ([#1593](https://github.com/ruby/rbs/pull/1593))
* Support cases where `Module#constants` has been redefined ([#1591](https://github.com/ruby/rbs/pull/1591))
* [prototype runtime] Fix error if direct inherited ([#1590](https://github.com/ruby/rbs/pull/1590))

## 3.3.0.pre.1 (2023-10-31)

### Signature updates

* json ([#1575](https://github.com/ruby/rbs/pull/1575))
* net-protocol ([#1559](https://github.com/ruby/rbs/pull/1559))
* pp ([#1545](https://github.com/ruby/rbs/pull/1545))
* psych ([#1527](https://github.com/ruby/rbs/pull/1527))
* `BasicObject` ([#1506](https://github.com/ruby/rbs/pull/1506))
* `ConditionVariable` ([#1468](https://github.com/ruby/rbs/pull/1468))
* `Encoding` ([#1510](https://github.com/ruby/rbs/pull/1510))
* `Exception` ([#1529](https://github.com/ruby/rbs/pull/1529))
* `FalseClass` ([#1478](https://github.com/ruby/rbs/pull/1478), [#1487](https://github.com/ruby/rbs/pull/1487))
* `Fiber` ([#1463](https://github.com/ruby/rbs/pull/1463))
* `FileTest` ([#1500](https://github.com/ruby/rbs/pull/1500))
* `Kernel` ([#1567](https://github.com/ruby/rbs/pull/1567), [#1518](https://github.com/ruby/rbs/pull/1518), [#1504](https://github.com/ruby/rbs/pull/1504), [#1487](https://github.com/ruby/rbs/pull/1487))
* `Marshal` ([#1524](https://github.com/ruby/rbs/pull/1524))
* `Math` ([#1533](https://github.com/ruby/rbs/pull/1533))
* `Mutex` ([#1468](https://github.com/ruby/rbs/pull/1468))
* `NilClass` ([#1478](https://github.com/ruby/rbs/pull/1478), [#1487](https://github.com/ruby/rbs/pull/1487))
* `Object` ([#1504](https://github.com/ruby/rbs/pull/1504))
* `Queue` ([#1468](https://github.com/ruby/rbs/pull/1468))
* `RbConfig` ([#1534](https://github.com/ruby/rbs/pull/1534))
* `Signal` ([#1512](https://github.com/ruby/rbs/pull/1512))
* `SizedQueue` ([#1468](https://github.com/ruby/rbs/pull/1468))
* `ThreadGroup` ([#1509](https://github.com/ruby/rbs/pull/1509))
* `TrueClass` ([#1478](https://github.com/ruby/rbs/pull/1478), [#1487](https://github.com/ruby/rbs/pull/1487))
* `Warning` ([#1477](https://github.com/ruby/rbs/pull/1477))
* `Enumerator.produce` ([#1516](https://github.com/ruby/rbs/pull/1516))
* `Module.define_method` ([#1557](https://github.com/ruby/rbs/pull/1557))
* `URI.join` ([#1580](https://github.com/ruby/rbs/pull/1580))
* `YAML.unsafe_load` ([#1528](https://github.com/ruby/rbs/pull/1528))
* `builtin.rbs`([#1455](https://github.com/ruby/rbs/pull/1455), [#1469](https://github.com/ruby/rbs/pull/1469))
* `constants.rbs` ([#1531](https://github.com/ruby/rbs/pull/1531))
* `::interned` ([#1499](https://github.com/ruby/rbs/pull/1499), [#1488](https://github.com/ruby/rbs/pull/1488))

### Language updates

* Add `__todo__` type ([#1520](https://github.com/ruby/rbs/pull/1520))

### Library changes

* Colored diff ([#1589](https://github.com/ruby/rbs/pull/1589))
* Fix the issue where ::array[T] would be interpreted as ::array, and type mismatch ([#1491](https://github.com/ruby/rbs/pull/1491))
* Add `Abbrev` to runtime dependency ([#1573](https://github.com/ruby/rbs/pull/1573))
* Avoid an error when parsing files including SyntaxError ([#1574](https://github.com/ruby/rbs/pull/1574))
* Implement rbs diff command ([#1459](https://github.com/ruby/rbs/pull/1459))
* Add another type syntax validation ([#1566](https://github.com/ruby/rbs/pull/1566))
* Mark global variables ([#1551](https://github.com/ruby/rbs/pull/1551))
* Show location of type by method command ([#1537](https://github.com/ruby/rbs/pull/1537))
* Make alias and interface names absolute ([#1502](https://github.com/ruby/rbs/pull/1502))
* Better record type format ([#1501](https://github.com/ruby/rbs/pull/1501))
* Should keep escape of alias and attr family ([#1486](https://github.com/ruby/rbs/pull/1486))
* Fix error when undefined interface or alias ([#1465](https://github.com/ruby/rbs/pull/1465))

#### rbs prototype

* [prototype runtime --todo] Consider accessibility mismatch ([#1539](https://github.com/ruby/rbs/pull/1539))
* Better support for inherited class of `Struct` or `Data` by prototype runtime ([#1571](https://github.com/ruby/rbs/pull/1571))
* prototype rb: Ignore ITER (method call with block) ([#1562](https://github.com/ruby/rbs/pull/1562))
* [prototype runtime] Add --autoload option ([#1561](https://github.com/ruby/rbs/pull/1561))
* Implement todo option ([#1470](https://github.com/ruby/rbs/pull/1470))
* [prototype runtime] Fix error when constant is a BasicObject instance. ([#1485](https://github.com/ruby/rbs/pull/1485))
* [prototype runtime] Const name should be absolute ([#1490](https://github.com/ruby/rbs/pull/1490))
* [prototype runtime] Optimize performance ([#1495](https://github.com/ruby/rbs/pull/1495))
* [prototype runtime] Fix error when output Object constants ([#1472](https://github.com/ruby/rbs/pull/1472))
* [prototype runtime] Support prepend mixin ([#1460](https://github.com/ruby/rbs/pull/1460))
* [prototype runtime] Avoid alias for methods defined in another module ([#1457](https://github.com/ruby/rbs/pull/1457))

#### rbs collection

* [Collection] Simple colorize collection text like Bundler ([#1558](https://github.com/ruby/rbs/pull/1558))
* Delete `sources` section from lockfile ([#1544](https://github.com/ruby/rbs/pull/1544))

### Miscellaneous

* Add in with_XXX methods ([#1492](https://github.com/ruby/rbs/pull/1492))
* Updated binding to use modern kernel tests ([#1507](https://github.com/ruby/rbs/pull/1507))
* Remove all non-required methods from testing types ([#1541](https://github.com/ruby/rbs/pull/1541))
* Add `assert_type` assertion to confirm if the value has a type ([#1532](https://github.com/ruby/rbs/pull/1532))
* Add `#assert_const_type` and guide to use type assertions ([#1514](https://github.com/ruby/rbs/pull/1514))
* Improve skip test message ([#1476](https://github.com/ruby/rbs/pull/1476))
* Type check ([#1467](https://github.com/ruby/rbs/pull/1467))
* Type check RDoc related Ruby code ([#1466](https://github.com/ruby/rbs/pull/1466))
* Fix CI failure ([#1464](https://github.com/ruby/rbs/pull/1464))

## 3.2.2 (2023-09-28)

### Library changes

* Mark global variables ([\#1552](https://github.com/ruby/rbs/pull/1552), Backport [\#1551](https://github.com/ruby/rbs/pull/1551))

## 3.2.1 (2023-08-29)

### Signature updates

* `Fiber` (Backport [#1463](https://github.com/ruby/rbs/pull/1463))

### Library changes

* Fix error when undefined interface or alias (Backport [#1465](https://github.com/ruby/rbs/pull/1465))

### Miscellaneous

* Improve skip test message (Backport [#1476](https://github.com/ruby/rbs/pull/1476))
* Fix CI failure (Backport [#1464](https://github.com/ruby/rbs/pull/1464))

## 3.2.0 (2023-08-22)

### Signature updates
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ gem "rdoc", "~> 6.4.0"
# Test gems
gem "rbs-amber", path: "test/assets/test-gem"

# Bundled gems
gem "net-smtp"

group :minitest do
gem "minitest"
end
34 changes: 20 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
PATH
remote: .
specs:
rbs (3.2.0)
rbs (3.3.0)
abbrev

PATH
remote: test/assets/test-gem
Expand All @@ -11,10 +12,10 @@ PATH
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.4)
abbrev (0.1.1)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.1.1)
dbm (1.1.0)
diff-lcs (1.5.0)
digest (3.1.1)
Expand All @@ -24,27 +25,31 @@ GEM
rainbow (>= 3.0, < 4.0)
strong_json (>= 1.1, < 2.2)
json (2.6.3)
json-schema (4.0.0)
json-schema (4.1.1)
addressable (>= 2.8)
language_server-protocol (3.17.0.3)
marcel (1.0.2)
minitest (5.20.0)
net-protocol (0.2.1)
timeout
net-smtp (0.4.0)
net-protocol
parallel (1.23.0)
parser (3.2.2.3)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
power_assert (2.0.3)
psych (4.0.6)
stringio
public_suffix (5.0.1)
public_suffix (5.0.3)
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
rake (13.1.0)
rake-compiler (1.2.5)
rake
rdoc (6.4.0)
psych (>= 4.0.0)
regexp_parser (2.8.1)
regexp_parser (2.8.2)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
Expand All @@ -59,30 +64,30 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.56.3)
base64 (~> 0.1.1)
rubocop (1.57.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-rubycw (0.1.6)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
stackprof (0.2.25)
stringio (3.0.7)
strong_json (2.1.2)
tempfile (0.1.3)
tempfile (0.2.0)
test-unit (3.6.1)
power_assert
unicode-display_width (2.4.2)
timeout (0.4.0)
unicode-display_width (2.5.0)

PLATFORMS
ruby
Expand All @@ -95,6 +100,7 @@ DEPENDENCIES
json
json-schema
minitest
net-smtp
rake
rake-compiler
rbs!
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ puts singleton.methods[:gsub]
- [Stdlib signatures guide](docs/stdlib.md)
- [Syntax](docs/syntax.md)
- [RBS by Example](docs/rbs_by_example.md)
- [RBS collection](docs/collection.md)
- [Using `Data` and `Struct`](docs/data_and_struct.md)

## Community

Here is a list of some places you can talk with active maintainers.

- [Ruby Discord Server (invite link)](https://discord.gg/ad2acQFtkh) -- We have `rbs` channel in Ruby Discord server.
- [ruby-jp Slack Workspace (in Japanese)](https://ruby-jp.github.io/) -- We have `types` channel in ruby-jp slack workspace.

## Development

Expand Down
14 changes: 8 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,14 @@ namespace :generate do
# library "pathname", "securerandom" # Declare library signatures to load
testing "singleton(::<%= target %>)"
<%- class_methods.each do |method_name, definition| %>
<%- class_methods.each do |method_name, definition| -%>
def test_<%= test_name_for(method_name) %>
<%- definition.method_types.each do |method_type| -%>
assert_send_type "<%= method_type %>",
<%= target %>, :<%= method_name %>
assert_send_type "<%= method_type %>",
<%= target %>, :<%= method_name %>
<%- end -%>
end
<%- end -%>
end
<%- end -%>
Expand All @@ -176,13 +177,14 @@ namespace :generate do
# library "pathname", "securerandom" # Declare library signatures to load
testing "::<%= target %>"
<%- instance_methods.each do |method_name, definition| %>
<%- instance_methods.each do |method_name, definition| -%>
def test_<%= test_name_for(method_name) %>
<%- definition.method_types.each do |method_type| -%>
assert_send_type "<%= method_type %>",
<%= target %>.new, :<%= method_name %>
assert_send_type "<%= method_type %>",
<%= target %>.new, :<%= method_name %>
<%- end -%>
end
<%- end -%>
end
<%- end -%>
Expand Down
3 changes: 2 additions & 1 deletion Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ target :lib do
"lib/rbs/test.rb"
)

library "pathname", "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'abbrev'
library "pathname", "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'abbrev', 'prettyprint'
signature 'stdlib/yaml/0'
signature "stdlib/strscan/0/"
signature "stdlib/optparse/0/"
signature "stdlib/rdoc/0/"
signature "stdlib/ripper/0"
signature "stdlib/pp/0"

# configure_code_diagnostics do |config|
# config[D::Ruby::MethodDefinitionMissing] = :hint
Expand Down
Loading

0 comments on commit dea3f9a

Please sign in to comment.