Skip to content

Commit

Permalink
Merge pull request #2676 from ruby/bump-version
Browse files Browse the repository at this point in the history
Bump to v0.25.0
  • Loading branch information
kddnewton authored Apr 5, 2024
2 parents 19c67fb + 29668f2 commit 225c940
Show file tree
Hide file tree
Showing 23 changed files with 93 additions and 44 deletions.
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ updates:
directory: '/gemfiles/truffleruby'
schedule:
interval: 'weekly'
- package-ecosystem: 'bundler'
directory: '/gemfiles/typecheck'
schedule:
interval: 'weekly'
# - package-ecosystem: 'bundler'
# directory: '/gemfiles/typecheck'
# schedule:
# interval: 'weekly'
34 changes: 17 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ jobs:
env:
LANG: "C"

typecheck:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: gemfiles/typecheck/Gemfile
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: Check Sorbet
run: bundle exec rake typecheck:tapioca typecheck:sorbet
- name: Check Steep
run: bundle exec rake typecheck:steep
- name: Check field kinds
run: rm lib/prism/node.rb && CHECK_FIELD_KIND=true bundle exec rake
# typecheck:
# runs-on: ubuntu-latest
# env:
# BUNDLE_GEMFILE: gemfiles/typecheck/Gemfile
# steps:
# - uses: actions/checkout@v4
# - name: Set up Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: "3.3"
# bundler-cache: true
# - name: Check Sorbet
# run: bundle exec rake typecheck:tapioca typecheck:sorbet
# - name: Check Steep
# run: bundle exec rake typecheck:steep
# - name: Check field kinds
# run: rm lib/prism/node.rb && CHECK_FIELD_KIND=true bundle exec rake

build:
strategy:
Expand Down
51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,54 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

## [Unreleased]

## [0.25.0] - 2024-04-05

### Added

- `Prism::Translation::Ripper` is now able to mirror all of the Ripper APIs.
- `Prism::Location#leading_comments` and `Prism::Location#trailing_comments` is added.
- `Prism::Comment#slice` is added.
- Warn for writing literal values in conditional predicates.
- Check for `_POSIX_MAPPED_FILES` before using `mmap`.
- `Prism::ItParametersNode` is added, to support `-> { it }`.
- Parse integer and float literal values onto the tree.
- Warn on duplicated hash keys and duplicated when clauses.
- Ship much improved `RBI` and `RBS` types.
- Support for the `-p`, `-n`, `-a`, and `-l` command line switches.
- Warn on integer literals in flip-flops.
- Support BSD make.
- Add `Prism::WhenNode#then_keyword_loc`.
- Support custom allocation functions through the `PRISM_XALLOCATOR` define.
- Warn for certain keywrods at the end of the line.
- Provide `pm_visit_node`, a C visitor API.
- `Prism::parse_stream` is added, which works for any Ruby `IO` object.
- Provide flags for regular expression literals for their derived encoding.
- Provide flags for whether or not an interpolated string literal is frozen.
- Add `Prism::StringNode.mutable?` for when a string is explicitly mutable, to support delineating chilled strings.
- Warn for incorrect character literal syntax.
- Warn for chained comparison operators.
- Warn for `**` interpreted as an argument prefix.
- Warn for `&` interpreted as an argument prefix.
- `Prism::ShareableConstantNode` added to support ractors.
- Warn for frozen string literals found after tokens.
- Support `PRISM_BUILD_MINIMAL` to provide only the minimal necessary functionality to reduce the binary size.
- Handle CLRF inside heredocs, strings, and regular expressions.
- Mark inner strings in interpolated strings as frozen.
- Support the `-x` command line switch.
- Error messages now much more closely mirror CRuby.
- Provide syntax errors for invalid block exits (`break`, `next`, `retry`, and `yield`).
- Warn on unused local variables.
- Do not syntax error on default parameter values that only write to the parameter.

### Changed

- Many improvements to the compatibility with the `whitequark/parser` translation.
- Accept newlines before pattern terminators `)` or `]`.
- `Prism::Node#start_offset` and `Prism::Node#end_offset` are now much more efficient.
- Read files using `fread` instead of `mmap` when we're going to keep around the source through the Ruby API.
- Fix `Sexp#line_max` setting in the `seattlerb/ruby_parser` translation layer.
- Allow spaces before the encoding comment.

## [0.24.0] - 2024-02-15

### Added
Expand Down Expand Up @@ -392,7 +440,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

- 🎉 Initial release! 🎉

[unreleased]: https://github.com/ruby/prism/compare/v0.24.0...HEAD
[unreleased]: https://github.com/ruby/prism/compare/v0.25.0...HEAD
[0.25.0]: https://github.com/ruby/prism/compare/v0.24.0...v0.25.0
[0.24.0]: https://github.com/ruby/prism/compare/v0.23.0...v0.24.0
[0.23.0]: https://github.com/ruby/prism/compare/v0.22.0...v0.23.0
[0.22.0]: https://github.com/ruby/prism/compare/v0.21.0...v0.22.0
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
prism (0.24.0)
prism (0.25.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ chruby ruby-3.2.3 && BUNDLE_GEMFILE=gemfiles/3.2/Gemfile bundle install
chruby ruby-3.3.0 && BUNDLE_GEMFILE=gemfiles/3.3/Gemfile bundle install
chruby ruby-3.4.0-dev && BUNDLE_GEMFILE=gemfiles/3.4/Gemfile bundle install
chruby jruby-9.4.5.0 && BUNDLE_GEMFILE=gemfiles/jruby/Gemfile bundle install
chruby truffleruby-23.1.2 && BUNDLE_GEMFILE=gemfiles/truffleruby/Gemfile bundle install
chruby truffleruby-24.0.0 && BUNDLE_GEMFILE=gemfiles/truffleruby/Gemfile bundle install
chruby ruby-3.4.0-dev && BUNDLE_GEMFILE=gemfiles/typecheck/Gemfile bundle install
```

Expand Down
2 changes: 1 addition & 1 deletion ext/prism/extension.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef PRISM_EXT_NODE_H
#define PRISM_EXT_NODE_H

#define EXPECTED_PRISM_VERSION "0.24.0"
#define EXPECTED_PRISM_VERSION "0.25.0"

#include <ruby.h>
#include <ruby/encoding.h>
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/2.7/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.24.0)
prism (0.25.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.0/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.24.0)
prism (0.25.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.1/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.24.0)
prism (0.25.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.2/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.24.0)
prism (0.25.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.3/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.24.0)
prism (0.25.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.4/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.24.0)
prism (0.25.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/jruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.24.0)
prism (0.25.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/truffleruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (0.24.0)
prism (0.25.0)

GEM
remote: https://rubygems.org/
Expand Down
4 changes: 2 additions & 2 deletions include/prism/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* The minor version of the Prism library as an int.
*/
#define PRISM_VERSION_MINOR 24
#define PRISM_VERSION_MINOR 25

/**
* The patch version of the Prism library as an int.
Expand All @@ -24,6 +24,6 @@
/**
* The version of the Prism library as a constant string.
*/
#define PRISM_VERSION "0.24.0"
#define PRISM_VERSION "0.25.0"

#endif
2 changes: 1 addition & 1 deletion javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ruby/prism",
"version": "0.24.0",
"version": "0.25.0",
"description": "Prism Ruby parser",
"type": "module",
"main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion prism.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "prism"
spec.version = "0.24.0"
spec.version = "0.25.0"
spec.authors = ["Shopify"]
spec.email = ["[email protected]"]

Expand Down
2 changes: 1 addition & 1 deletion rust/ruby-prism-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruby-prism-sys"
version = "0.24.0"
version = "0.25.0"
edition = "2021"
license-file = "../../LICENSE.md"
repository = "https://github.com/ruby/prism"
Expand Down
2 changes: 1 addition & 1 deletion rust/ruby-prism-sys/tests/utils_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn version_test() {
CStr::from_ptr(version)
};

assert_eq!(&cstring.to_string_lossy(), "0.24.0");
assert_eq!(&cstring.to_string_lossy(), "0.25.0");
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions rust/ruby-prism/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruby-prism"
version = "0.24.0"
version = "0.25.0"
edition = "2021"
license-file = "../../LICENSE.md"
repository = "https://github.com/ruby/prism"
Expand All @@ -26,7 +26,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"

[dependencies]
ruby-prism-sys = { version = "0.24.0", path = "../ruby-prism-sys" }
ruby-prism-sys = { version = "0.25.0", path = "../ruby-prism-sys" }

[features]
default = ["vendored"]
Expand Down
2 changes: 1 addition & 1 deletion templates/java/org/prism/Loader.java.erb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public class Loader {
expect((byte) 'M', "incorrect prism header");

expect((byte) 0, "prism major version does not match");
expect((byte) 24, "prism minor version does not match");
expect((byte) 25, "prism minor version does not match");
expect((byte) 0, "prism patch version does not match");

expect((byte) 1, "Loader.java requires no location fields in the serialized output");
Expand Down
2 changes: 1 addition & 1 deletion templates/javascript/src/deserialize.js.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as nodes from "./nodes.js";

const MAJOR_VERSION = 0;
const MINOR_VERSION = 24;
const MINOR_VERSION = 25;
const PATCH_VERSION = 0;

// The DataView getFloat64 function takes an optional second argument that
Expand Down
2 changes: 1 addition & 1 deletion templates/lib/prism/serialize.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Prism

# The minor version of prism that we are expecting to find in the serialized
# strings.
MINOR_VERSION = 24
MINOR_VERSION = 25

# The patch version of prism that we are expecting to find in the serialized
# strings.
Expand Down

0 comments on commit 225c940

Please sign in to comment.