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 Dec 26, 2023
2 parents dfaec42 + fea0932 commit 05c9850
Show file tree
Hide file tree
Showing 265 changed files with 15,606 additions and 8,244 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: "ubuntu-latest"
container:
image: rubylang/ruby:3.2-dev-focal
env:
RUBY_COMMIT: v3_3_0
steps:
- uses: actions/checkout@v4
- name: Install dependencies
Expand All @@ -22,11 +24,6 @@ jobs:
run: |
ruby -v
gem update --system
- name: bundle config set with
run: |
echo "NO_MINITEST=true" >> $GITHUB_ENV
bundle config set --local without 'minitest'
if: "contains(matrix.container_tag, 'master-nightly')"
- name: bin/setup
run: |
bin/setup
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ jobs:
job: stdlib_test
- container_tag: 3.1-dev-focal
job: stdlib_test
include:
- container_tag: master-nightly-focal
allow_failures: "true"
- container_tag: 3.2-dev-focal
job: stdlib_test
container:
image: rubylang/ruby:${{ matrix.container_tag }}
steps:
Expand All @@ -43,14 +42,14 @@ jobs:
- name: Install dependencies
run: |
apt-get update
apt-get install -y libdb-dev curl autoconf automake m4 libtool
apt-get install -y libdb-dev curl autoconf automake m4 libtool python3
- name: Install Re2c
if: contains(matrix.job, 'lexer')
run: |
cd /tmp
curl -L https://github.com/skvadrik/re2c/archive/refs/tags/3.0.tar.gz > re2c-3.0.tar.gz
tar xf re2c-3.0.tar.gz
cd re2c-3.0
curl -L https://github.com/skvadrik/re2c/archive/refs/tags/3.1.tar.gz > re2c-3.1.tar.gz
tar xf re2c-3.1.tar.gz
cd re2c-3.1
autoreconf -i -W all
./configure
make
Expand Down
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,71 @@

## master

## 3.4.0 (2023-12-21)

### Signature updates

* minitest's lifecycle hooks ([#1694](https://github.com/ruby/rbs/pull/1694))
* `IO.popen`, `IO#read` ([#1693](https://github.com/ruby/rbs/pull/1693))

### Library changes

* Fix klass name if klass is singleton_class ([#1695](https://github.com/ruby/rbs/pull/1695))

### Miscellaneous

* Suppress warnings on testing ([#1691](https://github.com/ruby/rbs/pull/1691))

## 3.4.0.pre.1 (2023-12-19)

### Signature updates

* Changes in ruby-3.3 ([#1684](https://github.com/ruby/rbs/pull/1684), [#1674](https://github.com/ruby/rbs/pull/1674))
* Embedded docs update ([#1689](https://github.com/ruby/rbs/pull/1689), [#1676](https://github.com/ruby/rbs/pull/1676))
* delegate ([#1677](https://github.com/ruby/rbs/pull/1677))
* `MatchData` ([#1651](https://github.com/ruby/rbs/pull/1651))
* `String` ([#1672](https://github.com/ruby/rbs/pull/1672), [#1641](https://github.com/ruby/rbs/pull/1641))
* `Struct` ([#1621](https://github.com/ruby/rbs/pull/1621))
* `Warning` categories ([#1576](https://github.com/ruby/rbs/pull/1576))
* `ConditionVariable#wait` ([#1670](https://github.com/ruby/rbs/pull/1670))
* `Date.parse` ([#1653](https://github.com/ruby/rbs/pull/1653))
* `IO#gets` ([#1620](https://github.com/ruby/rbs/pull/1620))
* `Kernel.Pathname` ([#1681](https://github.com/ruby/rbs/pull/1681))
* `Resolv::DNS::Resource::Generic.create` ([#1655](https://github.com/ruby/rbs/pull/1655))
* `Thread#raise` ([#1668](https://github.com/ruby/rbs/pull/1668))
* Builtin types ([#1680](https://github.com/ruby/rbs/pull/1680), [#1644](https://github.com/ruby/rbs/pull/1644))

### Library changes

* Add more details error message for `UnresolvedOverloadingError` ([#1688](https://github.com/ruby/rbs/pull/1688))
* Add `with_***` helpers ([#1687](https://github.com/ruby/rbs/pull/1687))
* Fix lexer ([#1685](https://github.com/ruby/rbs/pull/1685))
* Support `Delegator` object ([#1682](https://github.com/ruby/rbs/pull/1682))
* Should raise `ParsingError` instead of NoMethodError ([#1675](https://github.com/ruby/rbs/pull/1675))
* Implement multiple validate ([#1648](https://github.com/ruby/rbs/pull/1648))
* Add `RBS::UnitTest` modules ([#1660](https://github.com/ruby/rbs/pull/1660))
* Not cached as it may be replaced ([#1656](https://github.com/ruby/rbs/pull/1656))
* Should raise `ParsingError` instead of ArgumentError ([#1652](https://github.com/ruby/rbs/pull/1652))
* Added `WithEnum#but` and `with_range` ([#1649](https://github.com/ruby/rbs/pull/1649))
* Bugfix; `.respond_to` is no longer used in `Rbs::Test::Errors#inspect_` ([#1650](https://github.com/ruby/rbs/pull/1650))
* Add `--detail` option to rbs diff ([#1623](https://github.com/ruby/rbs/pull/1623))
* Fix parse error when quoted required keywords ([#1627](https://github.com/ruby/rbs/pull/1627))

#### rbs collection

* Fix order for collection sources ([#1659](https://github.com/ruby/rbs/pull/1659))
* [collection] Ignore directory starting with `_` as version from git source ([#1657](https://github.com/ruby/rbs/pull/1657))

### Miscellaneous

* Fix token names in comments ([#1658](https://github.com/ruby/rbs/pull/1658))
* Small bugfix to have guaranteed print out instance variables ([#1642](https://github.com/ruby/rbs/pull/1642))
* Fix flaky test ([#1616](https://github.com/ruby/rbs/pull/1616))
* Update syntax.md ([#1634](https://github.com/ruby/rbs/pull/1634))
* Add steep typecheck workflow ([#1632](https://github.com/ruby/rbs/pull/1632))
* Add doc for Generating RBS ([#1617](https://github.com/ruby/rbs/pull/1617))
* updated test harness utils ([#1600](https://github.com/ruby/rbs/pull/1600))

## 3.3.2 (2023-11-21)

### Miscellaneous
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gem "goodcheck"
gem "dbm"
gem 'digest'
gem 'tempfile'
gem "rdoc", "~> 6.4.0"
gem "rdoc"

# Test gems
gem "rbs-amber", path: "test/assets/test-gem"
Expand Down
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
rbs (3.4.0.dev)
rbs (3.4.0)
abbrev

PATH
Expand All @@ -12,7 +12,7 @@ PATH
GEM
remote: https://rubygems.org/
specs:
abbrev (0.1.1)
abbrev (0.1.2)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
Expand All @@ -24,7 +24,7 @@ GEM
psych (>= 3.1, < 5.0)
rainbow (>= 3.0, < 4.0)
strong_json (>= 1.1, < 2.2)
json (2.6.3)
json (2.7.1)
json-schema (4.1.1)
addressable (>= 2.8)
language_server-protocol (3.17.0.3)
Expand All @@ -42,14 +42,14 @@ GEM
psych (4.0.6)
stringio
public_suffix (5.0.3)
racc (1.7.1)
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
rake-compiler (1.2.5)
rake
rdoc (6.4.0)
rdoc (6.6.2)
psych (>= 4.0.0)
regexp_parser (2.8.2)
regexp_parser (2.8.3)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
Expand All @@ -64,15 +64,15 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.57.2)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
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)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
Expand All @@ -81,9 +81,9 @@ GEM
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
stackprof (0.2.25)
stringio (3.0.7)
stringio (3.1.0)
strong_json (2.1.2)
tempfile (0.2.0)
tempfile (0.2.1)
test-unit (3.6.1)
power_assert
timeout (0.4.0)
Expand All @@ -105,7 +105,7 @@ DEPENDENCIES
rake-compiler
rbs!
rbs-amber!
rdoc (~> 6.4.0)
rdoc
rspec
rubocop
rubocop-rubycw
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,15 @@ puts singleton.methods[:gsub]

## Guides

- [Architecture](docs/architecture.md)
- [Core and standard library signature contribution guide](docs/CONTRIBUTING.md)
- [Writing signatures guide](docs/sigs.md)
- [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)
- [Releasing a gem with RBS](docs/gem.md)

## Community

Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ end
task :validate => :compile do
require 'yaml'

sh "#{ruby} #{rbs} validate --silent"
sh "#{ruby} #{rbs} validate"

libs = FileList["stdlib/*"].map {|path| File.basename(path).to_s }

Expand All @@ -72,7 +72,7 @@ task :validate => :compile do
end

libs.each do |lib|
sh "#{ruby} #{rbs} -r #{lib} validate --silent"
sh "#{ruby} #{rbs} -r #{lib} validate"
end
end

Expand Down
4 changes: 2 additions & 2 deletions Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ target :lib do
check "lib"
ignore(
"lib/rbs/test",
"lib/rbs/test.rb"
# "lib/rbs/test.rb"
)

library "pathname", "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'abbrev', 'prettyprint', 'yaml'
library "pathname", "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'abbrev', 'prettyprint', 'yaml', "psych", "securerandom"
signature "stdlib/strscan/0/"
signature "stdlib/optparse/0/"
signature "stdlib/rdoc/0/"
Expand Down
32 changes: 21 additions & 11 deletions bin/generate_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,32 @@

set -ex

if [ -z ${RUBY_VERSION} ]; then
RUBY_VERSION=`ruby -e 'puts RUBY_VERSION'`
if [ -z ${RUBY_COMMIT} ]; then
RUBY_COMMIT=v`ruby -e 'puts RUBY_VERSION.gsub(".", "_")'`
fi

echo "RUBY_VERSION = ${RUBY_VERSION}"
if [ -z ${RBS_RDOC_BASE_DIR} ]; then
RBS_RDOC_BASE_DIR=/tmp/rbs-rdoc
fi

REPO_ROOT=$(cd $(dirname $(dirname $0)); pwd)

rm -f /tmp/ruby.tar.gz
rm -rf /tmp/ruby-${RUBY_VERSION}
echo "RBS_RDOC_BASE_DIR = ${RBS_RDOC_BASE_DIR}"
echo "RUBY_COMMIT = ${RUBY_COMMIT}"

RUBY_SRC_DIR=${RBS_RDOC_BASE_DIR}/ruby-${RUBY_COMMIT}
RDOC_OUT_DIR=${RBS_RDOC_BASE_DIR}/rdoc-${RUBY_COMMIT}

curl -L https://cache.ruby-lang.org/pub/ruby/${RUBY_VERSION%.*}/ruby-${RUBY_VERSION}.tar.gz | tar xzf - -C /tmp
rm -rf ${RUBY_SRC_DIR} ${RDOC_OUT_DIR}

rm -rf /tmp/rdoc-${RUBY_VERSION}
(
mkdir -p ${RUBY_SRC_DIR}
cd ${RUBY_SRC_DIR}
git init
git remote add origin https://github.com/ruby/ruby.git
git fetch --depth 1 origin ${RUBY_COMMIT}
git checkout FETCH_HEAD
bundle exec --gemfile=${REPO_ROOT}/Gemfile rdoc --output=${RDOC_OUT_DIR} --root="." --all --ri --page-dir="doc" "."
)

cd /tmp/ruby-${RUBY_VERSION}
bundle exec --gemfile=${REPO_ROOT}/Gemfile rdoc --output=/tmp/rdoc-${RUBY_VERSION} --root="." --all --ri --page-dir="doc" "."
cd ${REPO_ROOT}
bundle exec rbs annotate --no-system --no-gems --no-site --no-home -d /tmp/rdoc-${RUBY_VERSION} core stdlib
bundle exec rbs annotate --no-system --no-gems --no-site --no-home -d ${RDOC_OUT_DIR} core stdlib
Loading

0 comments on commit 05c9850

Please sign in to comment.