Skip to content

Commit

Permalink
Confirm the generated code is up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaro committed Nov 29, 2024
1 parent 61c7f24 commit c0d6ee7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
job: stdlib_test
rubyopt: "--enable-frozen-string-literal"
- ruby: "3.3"
job: lexer compile confirm_lexer
job: lexer templates compile confirm_lexer confirm_templates
- ruby: "3.3"
job: rubocop validate test_doc build test_generate_stdlib raap
- ruby: "3.3"
Expand Down
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ task :confirm_lexer => :lexer do
sh "git diff --exit-code ext/rbs_extension/lexer.c"
end

task :confirm_templates => :templates do
puts "Testing if generated code under include and src is updated with respect to templates"
sh "git diff --exit-code -- include src"
end

rule ".c" => ".re" do |t|
puts "⚠️⚠️⚠️ #{t.name} is older than #{t.source}. You may need to run `rake lexer` ⚠️⚠️⚠️"
end
Expand Down

0 comments on commit c0d6ee7

Please sign in to comment.