From af0c03a87efa3abfb678193b90f62b97fb9b8303 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Wed, 7 Aug 2024 10:26:19 +0200 Subject: [PATCH] Work --- building/tooling/test-runners/libraries.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/building/tooling/test-runners/libraries.md b/building/tooling/test-runners/libraries.md index a2c30bbc..138bae70 100644 --- a/building/tooling/test-runners/libraries.md +++ b/building/tooling/test-runners/libraries.md @@ -6,14 +6,14 @@ Exercises must thus, with few exceptions, be solvable without using libraries. ## Reasons to support libraries -There are couple of reasons why a track might still want to support using libraries: +There are couple of reasons why a track might still want to support libraries: -1. The language has a minimal standard library and it is idiomatic to use libraries to add functionality. +1. The language has a (very) minimal standard library. An example of such a language is Rust. -2. The exercise is only really solvable using libraries. - An example of such an exercise is the [lens-person exercise](https://exercism.org/exercises/lens-person), which in many languages can only be solved using a library. -3. The library adds testing functionality. +2. The library adds testing functionality. An example is a library that adds support for property-based testing. +3. The exercise can only be solved using a library. + An example of such an exercise is the [lens-person exercise](https://exercism.org/exercises/lens-person), which in most languages can only be solved using a library. ## Supporting libraries in the test runner @@ -21,10 +21,13 @@ As the test runner does not have access to the internet whilst running, it is no The **only** solution to this problem is to install/download libraries at build time, where you _do_ have access to the internet. In practice, this means you'll need to install/download libraries within the Dockerfile. -https://github.com/exercism/prolog-test-runner/blob/ed7447a7518ede6ee3405e649f50aaec828e318b/Dockerfile +As an example, the [Prolog test runner's Dockerfile](https://github.com/exercism/prolog-test-runner/blob/ed7447a7518ede6ee3405e649f50aaec828e318b/Dockerfile) installs the `date_time` library: + +```dockerfile +RUN swipl pack install date_time -y +``` ## Documentation -If your track supports additional -(/docs/building/tracks/docs) -We recommend creating a document in the track repo's `docs` directory that lists the libraries that people can use, po +If your track supports libraries, this should be documented in a [track doc](/docs/building/tracks/docs). +Please also link to this document (using its full URL) from the [`exercises/shared/.docs/help.md` document](/docs/building/tracks/shared-files#file-help-md).