exercism / dart

Exercism exercises in Dart.
https://exercism.org/tracks/dart
MIT License
57 stars 94 forks source link

add the pubspec.yaml as an "invalidator" file #533

Closed glennj closed 6 months ago

glennj commented 6 months ago

From https://github.com/exercism/dart-test-runner/pull/76#issuecomment-1948083625

for f in exercises/practice/*/.meta/config.json ; do
  echo $f
  jq '.files.invalidator = ["pubspec.yaml"]' $f | sponge $f
done

https://exercism.org/docs/building/tracks/practice-exercises#h-file-meta-config-json

invalidator: files that when changed, cause a solution to become out-of-date (optional)

glennj commented 6 months ago

@ErikSchierboom when this PR is merged, is it a "no important files changed" PR?

ErikSchierboom commented 6 months ago

is it a "no important files changed" PR?

I'd add it to be sure.

Stargator commented 6 months ago

@glennj is there a check to verify new exercises have this configuration?

glennj commented 6 months ago

Well, #534 ensures that bin/configlet create --practice-exercise $slug_name creates the .meta/config.json with the invalidator file. bin/create_exercise.dart does not create .meta/config.json, so I suppose the answer to your question is no.

I'll have a look at adding a call to bin/configlet create into the dart exercise creation script.