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 committed Apr 12, 2018
1 parent fbc5d91 commit 20ffe29
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 @@ rule %r|_parser\.rl\z| => '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 20ffe29

Please sign in to comment.