anonimitoraf / exercism.el

Emacs integration for https://exercism.org
GNU General Public License v3.0
32 stars 2 forks source link

Support submitting multiple files #3

Closed fapdash closed 1 year ago

fapdash commented 1 year ago

Some tracks require you to submit multiple files for a correct solution. On the command line this can be done like the following:

exercism submit resistor_color.c resistor_color.h

Would be nice to do this through exercism.el, not sure about the proper UI/UX though. Do you have an idea?

anonimitoraf commented 1 year ago

Ah, I wasn't aware that was the case for some languages. Do the filenames (excluding the extension) always match?

fapdash commented 1 year ago

I think you shouldn't pass the buffer-file-name:

https://github.com/anonimitoraf/exercism.el/blob/a8248e1afdae9155992227611cf134ec49fdd489/exercism.el#L154

https://github.com/anonimitoraf/exercism.el/blob/a8248e1afdae9155992227611cf134ec49fdd489/exercism.el#L137

Just make sure to run the exercism submit command in the root dir of the exercise. If you don't specify any file the CLI will automatically submit the files specified in the config.json:

https://github.com/exercism/c/blob/78f9e855515e086e480381697e72aa6b4815a9de/exercises/practice/resistor-color/.meta/config.json#L10-L13

I just tried running exercism submit in the exercise folder and it submitted both files, resistor_color.c and resistor_color.h.

anonimitoraf commented 1 year ago

Ah cool, I'll try it out tomorrow

anonimitoraf commented 1 year ago

Sorry for the delay. Can you please try updating (should be fixed by 1dfee3d12e4bf76647bcaed7ccf36fb0815f068f)

fapdash commented 1 year ago

Fixed, thank you!