Contribution Setup

Hello Rakoons,

I’m stuck figuring out my local exercism raku setup from scratch again. This time I’m making notes as I go along…

The current snag is that after running:

$ configlet sync --exercise EXAMPLE

Updating cached 'problem-specifications' data...
Checking exercises...
The `EXAMPLE` exercise has up-to-date docs, filepaths, metadata, and tests!

And after creating an appropriate template-data.yaml file, I get a directory issue when running the exercise generator of:

$ exercise-gen.raku EXAMPLE
`problem-specifications` directory not found; exercise(s) may generate incorrectly.
Run `bin/configlet sync` to sync data.
exercise directory does not exist for: EXAMPLE

configlet sync has been run but the problem-specifications directory is not being found and only appears to be lurking in ~/Library/Caches/exercism/configlet

I guess I’m missing a symlink, environment variable and/or git pull. Thank you for your guidance and patience. :smile:

Looking at this: raku/bin/exercise-gen.raku at 3dfabccdfe7031cc983d90e8ff0fee49e683b2e8 · exercism/raku · GitHub

Seems exercise-gen.raku looks for problem-specs in ~/.cache/exercism/configlet/problem-specifications - is this where configlet is downloading things into?

If not, you can manually specify a folder which contains problem-specifications to configlet:

  • To skip downloading the problem-specifications repo, add --offline --prob-specs-dir /path/to/local/problem-specifications

Make sure to clone problem-specifications to /path/to/local/problem-specifications before calling that command.

Seems like a useful /path/to/local/problem-specifications to exercise-gen.raku would be ~/.cache/exercism/configlet/problem-specifications, so maybe you can manually clone it there and also tell configlet to look there with the --offline and --prob-specs-dir flags.

Alternatively, if you know Raku, you could change the script to look in more places or even take a parameter or flag with the directory for problem-specifications?

Thank you @andrerfcsantos ! :smiley:

Things resolved when I placed the track and problem specifications at the same level:

.
+--- problem-specifications
\--- raku

The tools configlet and exercise-gen.raku then seemed to find their dependencies.

~/Library/Caches is a directory on MacOS, if I’m not mistaken?

It should be fairly straightforward to add a condition with something like $*DISTRO, but I’m not sure what the typical output is like on a Mac and there doesn’t appear to be a method equivalent to something like is-win. I’ll do some more poking around over the next few days.

Yes, I’m on macOS. The issue resolved when I understood the ideal relative placement of the problem-specification and track repositories. I’m writing a low level Contribution Guide, but it keeps changing as I learn more and streamline it.