exercism / exercism/configlet

sync: handle TOML parsing exception for `metadata.toml`

Open
#617 0 comments 0 reactions 0 assignees View on GitHub
cmd: sync kind: bug
Dominant language
Nim
Stars
23
Forks
17
Avg merge
13h 57m
Merged PRs (30d)
1

Description

Follow-up from https://github.com/exercism/configlet/pull/614.

`configlet sync` will produce an unhandled exception if the user's cached prob-specs dir contains an invalid `metadata.toml` file, or if its values are of the wrong type.

https://github.com/exercism/configlet/blob/5a2937df47fa6c9917838f1b892187bdd5f41425/src/sync/sync_metadata.nim#L21-L32

But it's unlikely that anybody notices: the unhandled exception should only occur if a user has manually edited a `metadata.toml` file in their prob-specs cache to contain invalid TOML, and we have some protection against invalid prob-specs cache states.

However, the prob-specs CI doesn't currently lint `metadata.toml` files, so we do currently depend on prob-specs reviewers for the `metadata.toml` files to be valid upstream. I've opened [exercism/problem-specifications#2061](https://github.com/exercism/problem-specifications/issues/2061) to track that.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.