From 3f35b37351cfc21f00c6086a072eac74246ec74a Mon Sep 17 00:00:00 2001 From: Yusuke Nakamura Date: Fri, 13 Apr 2018 00:13:43 +0900 Subject: [PATCH] Set full path of the ragel source file to rake task In Rake v12.1.0 or higher, the algorithm of resolve file dependency was changed in https://github.com/ruby/rake/pull/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. --- tasks/ragel.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/ragel.rake b/tasks/ragel.rake index 58d525624..00ce33732 100644 --- a/tasks/ragel.rake +++ b/tasks/ragel.rake @@ -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