gherkin icon indicating copy to clipboard operation
gherkin copied to clipboard

perl: Adding a new translation has a dependency on perl

Open mpkorstanje opened this issue 3 years ago • 3 comments

🤔 What's the problem you've observed?

When a contributor updates gherkin-languages.json they'll run make copy-gherkin-languages to copy this file and/or generate derived for each implementation. This process should be light weight only depend on a few tools such as jq, however for Perl, this process currently depends on Perl.

https://github.com/cucumber/gherkin/blob/1cc2ef0153603c5e51818b59ff6d632238491226/perl/Makefile#L32-L37

✨ Do you have a proposal for making it better?

Consider using jq instead of perl to generate Languages.pm instead. For example see:

https://github.com/cucumber/gherkin/blob/1cc2ef0153603c5e51818b59ff6d632238491226/go/dialects_builtin.go.jq

mpkorstanje avatar Nov 08 '22 13:11 mpkorstanje

@ehuelsmann might be good to pick this up in combination with https://github.com/cucumber/gherkin/issues/32

mpkorstanje avatar Nov 08 '22 13:11 mpkorstanje

This problem would be solved by using the sames solution as the one i suggested in #32. I guess I could try to generate valid Perl from inside jq, but I wonder if that's worth the effort, or that we're really trying to solve the wrong problem here...

ehuelsmann avatar Nov 10 '22 22:11 ehuelsmann

Perhaps, let's try to work this out in #32.

mpkorstanje avatar Nov 10 '22 22:11 mpkorstanje