~zainab/blog

8126f1c17b5bc0f6f133934faeaf258fe9d70614 — zainab-ali 7 months ago 325a8f5
Reintroduce coursier hack
1 files changed, 9 insertions(+), 7 deletions(-)

M nix/mdoc.bash
M nix/mdoc.bash => nix/mdoc.bash +9 -7
@@ 7,12 7,14 @@ set -ex
fs2=$(cs fetch -p co.fs2:fs2-core_3:3.1.3)
catseffect=$(cs fetch -p org.typelevel:cats-effect_3:3.3.2)

cs launch org.scalameta:mdoc_3:2.2.23 -- \
# FIXME: coursier doesn't finish when there is an `error` snippet in mdoc
# Hack around this by timing out once we think it's finished
timeout 1m cs launch org.scalameta:mdoc_3:2.2.23 -- \
   --classpath $fs2 \
   --in src/chapters/fs2/snippets.md \
   --out src/chapters/fs2/snippets.out.md
cs launch org.scalameta:mdoc_3:2.2.23 -- \
time cs launch org.scalameta:mdoc_3:2.2.23 -- \
   --classpath $catseffect \
   --in src/chapters/2022-02-12-cats-effect-ioruntime/snippets.md \
   --out src/chapters/2022-02-12-cats-effect-ioruntime/snippets.out.md
   --out src/chapters/fs2/snippets.out.md || true

timeout 5m cs launch org.scalameta:mdoc_3:2.2.23 -- \
	 --classpath $catseffect \
	 --in src/chapters/2022-02-12-cats-effect-ioruntime/snippets.md \
	 --out src/chapters/2022-02-12-cats-effect-ioruntime/snippets.out.md || true