Skip to content

Commit

Permalink
Set full path of the ragel source file to rake task
Browse files Browse the repository at this point in the history
In Rake v12.1.0 or higher, the algorithm of resolve file dependency
was changed in ruby/rake#39 .

Then rake task "ragel:generate" is works incorrectry that require
wrong ragel source file.
As the example, rake resolves "lib/mail/parsers/address_lists_parser.rb"
needs "lib/mail/parsers/address_lists.rl", but this file is not exist.

Therefore, fixed that to pass full path of the ragel source file
to rule.
  • Loading branch information
unasuke authored and jeremy committed Apr 13, 2018
1 parent 20482ae commit 3f35b37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/ragel.rake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ file 'lib/mail/parsers/rfc5322.rl' => FileList['lib/mail/parsers/rfc5322_*.rl']

# Ruby parsers depend on Ragel parser definitions
# (remove -L to include line numbers for debugging)
rule %r|/_parser\.rb\z/| => '.rl' do |t|
rule %r|/_parser\.rb\z/| => '%X.rl' do |t|
sh "ragel -s -R -L -F1 -o #{t.name} #{t.source}"
end

Expand Down

0 comments on commit 3f35b37

Please sign in to comment.