whitequark / parser

A Ruby parser.
Other
1.57k stars 197 forks source link

Register a Ruby 3.4 parser #991

Closed casperisfine closed 6 months ago

casperisfine commented 6 months ago

To avoid failing when running as part of ruby-head test builds.

I did the same as previous years, just initialized 3.4 as a copy of 3.3.

koic commented 6 months ago

Rakefile lacks the following change:

diff --git a/Rakefile b/Rakefile
index 778e61db..1afcf209 100644
--- a/Rakefile
+++ b/Rakefile
@@ -38,6 +38,7 @@ GENERATED_FILES = %w(lib/parser/lexer-F0.rb
                      lib/parser/ruby31.rb
                      lib/parser/ruby32.rb
                      lib/parser/ruby33.rb
+                     lib/parser/ruby34.rb
                      lib/parser/macruby.rb
                      lib/parser/rubymotion.rb)

Ref: https://github.com/whitequark/parser/pull/904

casperisfine commented 6 months ago

@koic good catch. I updated my PR.

koic commented 6 months ago

Overall, this looks good. One point I forgot to mention is that the commit message title needs + prefix: https://github.com/whitequark/parser/blob/master/CONTRIBUTING.md#contributing-to-parser

casperisfine commented 6 months ago

the commit message title needs + prefix:

Ah, thank you. I fixed that as well.

iliabylich commented 6 months ago

Thanks.

Honestly I was hoping for some hype around Prism to slowly deprecate parser for 3.4+ Rubies. Maintaining all grammars for all Rubies starting from 1.8 is getting more and more painful, any change to the shape of the internal state can require a change to 16 (well, now 17) .y files.

Also, branching 3.4 now means that we'll need to backport all changes starting from Ruby 3.3.1 both to ruby33.y and ruby34.y so previously I was trying to postpone adding a new version of parser as much as I could until somebody comes and explicitly asks to do that. This time it happened faster than ever before.

Do you need a release?

casperisfine commented 6 months ago

Honestly I was hoping for some hype around Prism to slowly deprecate parser for 3.4+ Rubies.

I highly suspect 3.4 will be the last one, but yeah, right now lots of tooling hasn't moved (and will probably take a while because prism doesn't support older rubies (yet?)

Do you need a release?

It would be nice, but no rush.

iliabylich commented 6 months ago

3.3.0.4 has been released

casperisfine commented 6 months ago

Much appreciated.