Request to add modules to the test runner

My appreciation for all the effort taken recently to rejuvenate the test suites in the perl5 track. I’ve refreshed my perl5 solutions so most of them are now passing. I have a few exercises that fail because they use modules not available in the test runner:

I’d also like DateTime (and DateTime::Format::ISO8601 for parsing), but Time::Piece can do the really important parts of them.

Thoughts about including these? I’d be happy to submit a PR to the test-runner repo.

1 Like

I’m willing to consider some additional modules. Ideally I want users to be able to bundle in their used modules with their solutions, but I’m not sure at what point that will be practical. Its doable as an undocumented feature, but the file size restriction present in the CLI is a hurdle for some modules: Is the file size restriction still correct? · Issue #1047 · exercism/cli · GitHub

An example where I’ve attempted this can be found here (although this may not currently be working):

We’d also likely need to have a document somewhere listing which modules are supported

Modules could be baked into the test runner. They wouldn’t need to be submitted by students via the CLI. So I don’t think the file restriction is a limitation. Unless I’m misunderstanding something?

The idea is to allow students to bundle any additional modules they choose. e.g. My solution above uses Lingua::Romana::Perligata which likely wouldn’t be something we’d bake into the test runner!

Having some additional modules on the test runner regardless of this would still be nice to have though. Would likely be worth having a discussion on a per-module basis re: what it adds, what are potential alternatives (especially core ones), exercises it would aid (or possibly hinder).

@m-dango I attempted to replicate but test runner can’t find Set::Tiny.

locally:

$ carton install; carton exec prove .
$ mkdir -p vendor/cache/authors/id/T/TR/TRENDELS/ vendor/cache/modules/
$ cp local/cache/authors/id/T/TR/TRENDELS/Set-Tiny-0.04.tar.gz vendor/cache/authors/id/T/TR/TRENDELS/
$ cp local/cache/modules/02packages.details.txt vendor/cache/modules/
$ exercism submit Sieve.pm cpanfile vendor/cache/authors/id/T/TR/TRENDELS/Set-Tiny-0.04.tar.gz vendor/cache/modules/02packages.details.txt

Yeah, a few tracks do this and it works really well. @ErikSchierboom can guide you if you’d like a little brainstorming on this.

I think some adjustments need to be made since the switch to read only on docker, I’ll take a look.

EDIT: It’s working for me, I think you missed the .gz on the 02packages file!