Where do invalidators go and how do they propagate

If I understand correctly, an “invalidator” block in config.json does not appear in the top-level config.json but in each exercise’s .meta/config.json. Is that correct?

So I incorrectly have

,
    "invalidator": [
      "lib/cmprep.sno",
      "lib/inhale.sno",
      "lib/listtests.sno",
      "lib/nextword.sno",
      "lib/whereami.sno"
    ]

in my top-level config.json. I was rather hoping that configlet would copy that to each exercise that I create.

That’s what’s documented. It seems it should be in the the track’s config.

I suppose this kind of thing is why tracks often have a bin/add_exercise script.

Except that that would overlap with configlet create, no?

Yes. And/or wrap it. The configlet is a generic tool. Many tracks have track specific tooling that supplements/replaces the generic tool.

Right. bin/add_exercise invokes configlet create and then fixes all the things that configlet didn’t do.

1 Like