Closed
Description
Describe the bug
A clear and concise description of what the bug is.
rake ragel fails like this.
$ touch ext/puma_http11/http11_parser.c
$ bundle exec rake ragel
ragel ext/puma_http11/http11_parser.rl -C -G2 -I ext/puma_http11 -o ext/puma_http11/http11_parser.c
ragel: -C is an invalid argument
rake aborted!
Could not build wrapper using Ragel (it failed or not installed?)
/home/jaruga/git/puma/Rakefile:24:in `rescue in block in <top (required)>'
/home/jaruga/git/puma/Rakefile:21:in `block in <top (required)>'
/home/jaruga/git/puma/.bundle/puma/ruby/2.7.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/ruby-2.7.0/bin/bundle:23:in `load'
/usr/local/ruby-2.7.0/bin/bundle:23:in `<main>'
Caused by:
Command failed with status (1): [ragel ext/puma_http11/http11_parser.rl -C ...]
/home/jaruga/git/puma/Rakefile:22:in `block in <top (required)>'
/home/jaruga/git/puma/.bundle/puma/ruby/2.7.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/ruby-2.7.0/bin/bundle:23:in `load'
/usr/local/ruby-2.7.0/bin/bundle:23:in `<main>'
Tasks: TOP => ragel => ext/puma_http11/http11_parser.c
(See full trace by running task with --trace)
Puma config:
Please copy-paste your Puma config AND your command line options here.
I think Puma config is not related to this issue.
To Reproduce
Please add reproduction steps here.
According to the whitequark/parser#317 , ragel >= 7.0.0.9 supports Ruby again.
$ ragel --version
Ragel State Machine Compiler version 7.0.0.12 May 2019
Copyright (c) 2001-2019 by Adrian Thurston
$ bundle install --path=.bundle/puma
$ bundle exec rake compile
$ touch ext/puma_http11/http11_parser.c
$ bundle exec rake ragel
Expected behavior
A clear and concise description of what you expected to happen.
bundle exec rake ragel is executed successfully.
Desktop (please complete the following information):
- OS: Linux Fedora 31
- Puma Version: The latest master branch:
0b737cce42746d8226701520f35685e0624e061b
Note
When I changed the ragel -C with ragel -R seeing the help, it failed with "ragel: -R is an invalid argument".
$ ragel --help
...
host language:
-C C, C++, Obj-C or Obj-C++ (default)
All code styles supported.
--asm --gas-x86-64-sys-v
GNU AS, x86_64, System V ABI.
Generated in a code style equivalent to -G2
-D D All code styles supported
-Z Go All code styles supported
-A C# -T0 -T1 -F0 -F1 -G0 -G1
-J Java -T0 -T1 -F0 -F1
-R Ruby -T0 -T1 -F0 -F1
...
$ git diff
diff --git a/Rakefile b/Rakefile
index 231be50b..c39547a5 100644
--- a/Rakefile
+++ b/Rakefile
@@ -19,7 +19,7 @@ task :ragel
file 'ext/puma_http11/http11_parser.c' => ['ext/puma_http11/http11_parser.rl'] do |t|
begin
- sh "ragel #{t.prerequisites.last} -C -G2 -I ext/puma_http11 -o #{t.name}"
+ sh "ragel #{t.prerequisites.last} -R -G2 -I ext/puma_http11 -o #{t.name}"
rescue
fail "Could not build wrapper using Ragel (it failed or not installed?)"
end
$ bundle exec rake ragel
ragel ext/puma_http11/http11_parser.rl -R -G2 -I ext/puma_http11 -o ext/puma_http11/http11_parser.c
ragel: -R is an invalid argument
rake aborted!
Could not build wrapper using Ragel (it failed or not installed?)
/home/jaruga/git/puma/Rakefile:24:in `rescue in block in <top (required)>'
/home/jaruga/git/puma/Rakefile:21:in `block in <top (required)>'
/home/jaruga/git/puma/.bundle/puma/ruby/2.7.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/ruby-2.7.0/bin/bundle:23:in `load'
/usr/local/ruby-2.7.0/bin/bundle:23:in `<main>'
Caused by:
Command failed with status (1): [ragel ext/puma_http11/http11_parser.rl -R ...]
/home/jaruga/git/puma/Rakefile:22:in `block in <top (required)>'
/home/jaruga/git/puma/.bundle/puma/ruby/2.7.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/ruby-2.7.0/bin/bundle:23:in `load'
/usr/local/ruby-2.7.0/bin/bundle:23:in `<main>'
Tasks: TOP => ragel => ext/puma_http11/http11_parser.c
(See full trace by running task with --trace)
Metadata
Metadata
Assignees
Labels
No labels