Repository: ruby/yarp
Pull request #1288 (2023-08-19 01:05:29)

Bump to version 0.8.0


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ccd202e..b1985207 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
 
 ## [Unreleased]
 
+## [0.8.0] - 2023-08-18
+
+### Added
+
+- Some performance improvements when converting from the C AST to the Ruby AST.
+- Two rust crates have been added: `yarp-sys` and `yarp`. They are as yet unpublished.
+
+### Changed
+
+- Escaped newlines in strings and heredocs are now handled more correctly.
+- Dedenting heredocs that result in empty string nodes will now drop those string nodes from the list.
+- Beginless and endless ranges in conditional expressions now properly form a flip flop node.
+- `%` at the end of files no longer crashes.
+- Location information has been corrected for `if/elsif` chains that have no `else`.
+- `__END__` at the very end of the file was previously parsed as an identifier, but is now correct.
+- **BREAKING**: Nodes that reference `&&=`, `||=`, and other writing operators have been consolidated. Previously, they were separate individual nodes. Now they are a tree with the target being the left-hand side and the value being the right-hand side with a joining `AndWriteNode`, `OrWriteNode`, or `OperatorWriteNode` in the middle. This impacts all of the nodes that match this pattern: `{ClassVariable,Constant,ConstantPath,GlobalVariable,InstanceVariable,LocalVariable}Operator{And,Or,}WriteNode`.
+- **BREAKING**: `BlockParametersNode`, `ClassNode`, `DefNode`, `LambdaNode`, `ModuleNode`, `ParenthesesNode`, and `SingletonClassNode` have had their `statements` field renamed to `body` to give a hint that it might not be a `StatementsNode` (it could also be a `BeginNode`).
+
 ## [0.7.0] - 2023-08-14
 
 ### Added
@@ -22,7 +40,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
 
 - Autotools has been removed from the build system, so when the gem is installed it will no longer need to go through a configure step.
 - The AST for `foo = *bar` has changed to have an explicit array on the right hand side, rather than a splat node. This is more consistent with how other parsers handle this.
-- `RangeNodeFlags` has been renamed to `RangeFlags`.
+- **BREAKING**: `RangeNodeFlags` has been renamed to `RangeFlags`.
 - Unary minus on number literals is now parsed as part of the literal, rather than a call to a unary operator. This is more consistent with how other parsers handle this.
 
 ## [0.6.0] - 2023-08-09
@@ -31,6 +49,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
 
 - 🎉 Initial release! 🎉
 
-[unreleased]: https://github.com/ruby/yarp/compare/v0.7.0...HEAD
+[unreleased]: https://github.com/ruby/yarp/compare/v0.8.0...HEAD
+[0.8.0]: https://github.com/ruby/yarp/compare/v0.7.0...v0.8.0
 [0.7.0]: https://github.com/ruby/yarp/compare/v0.6.0...v0.7.0
 [0.6.0]: https://github.com/ruby/yarp/compare/d60531...v0.6.0
diff --git a/Gemfile.lock b/Gemfile.lock
index 5a6ab224..2a9fb52b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
 PATH
   remote: .
   specs:
-    yarp (0.7.0)
+    yarp (0.8.0)
 
 GEM
   remote: https://rubygems.org/
diff --git a/ext/yarp/extension.h b/ext/yarp/extension.h
index 12381317..75d5cc84 100644
--- a/ext/yarp/extension.h
+++ b/ext/yarp/extension.h
@@ -5,7 +5,7 @@
 #include <ruby/encoding.h>
 #include "yarp.h"
 
-#define EXPECTED_YARP_VERSION "0.7.0"
+#define EXPECTED_YARP_VERSION "0.8.0"
 
 VALUE yp_source_new(yp_parser_t *parser);
 VALUE yp_token_new(yp_parser_t *parser, yp_token_t *token, rb_encoding *encoding, VALUE source);
diff --git a/include/yarp/version.h b/include/yarp/version.h
index a798d76c..179543f5 100644
--- a/include/yarp/version.h
+++ b/include/yarp/version.h
@@ -1,4 +1,4 @@
 #define YP_VERSION_MAJOR 0
-#define YP_VERSION_MINOR 7
+#define YP_VERSION_MINOR 8
 #define YP_VERSION_PATCH 0
-#define YP_VERSION "0.7.0"
+#define YP_VERSION "0.8.0"
diff --git a/templates/java/org/yarp/Loader.java.erb b/templates/java/org/yarp/Loader.java.erb
index f7877050..454f5f30 100644
--- a/templates/java/org/yarp/Loader.java.erb
+++ b/templates/java/org/yarp/Loader.java.erb
@@ -49,7 +49,7 @@ public class Loader {
     private final Nodes.Source source;
 
     private byte MAJOR_VERSION = (byte) 0;
-    private byte MINOR_VERSION = (byte) 7;
+    private byte MINOR_VERSION = (byte) 8;
     private byte PATCH_VERSION = (byte) 0;
 
     private Loader(byte[] serialized, Nodes.Source source) {
diff --git a/templates/lib/yarp/serialize.rb.erb b/templates/lib/yarp/serialize.rb.erb
index 4194025c..65cd52e2 100644
--- a/templates/lib/yarp/serialize.rb.erb
+++ b/templates/lib/yarp/serialize.rb.erb
@@ -14,7 +14,7 @@ end
 module YARP
   module Serialize
     MAJOR_VERSION = 0
-    MINOR_VERSION = 7
+    MINOR_VERSION = 8
     PATCH_VERSION = 0
 
     def self.load(input, serialized)
diff --git a/yarp.gemspec b/yarp.gemspec
index f32cd4b6..db69bcb4 100644
--- a/yarp.gemspec
+++ b/yarp.gemspec
@@ -2,7 +2,7 @@
 
 Gem::Specification.new do |spec|
   spec.name = "yarp"
-  spec.version = "0.7.0"
+  spec.version = "0.8.0"
   spec.authors = ["Shopify"]
   spec.email = ["ruby@shopify.com"]
 


Test patch:
diff --git a/rust/yarp-sys/tests/utils_tests.rs b/rust/yarp-sys/tests/utils_tests.rs
index 1b42d574..9ffa1e6c 100644
--- a/rust/yarp-sys/tests/utils_tests.rs
+++ b/rust/yarp-sys/tests/utils_tests.rs
@@ -12,7 +12,7 @@ fn version_test() {
         CStr::from_ptr(version)
     };
 
-    assert_eq!(&cstring.to_string_lossy(), "0.7.0");
+    assert_eq!(&cstring.to_string_lossy(), "0.8.0");
 }
 
 #[test]