# Opam CI failing due to unused dependency

**URL:** <https://discuss.ocaml.org/t/opam-ci-failing-due-to-unused-dependency/12725>\
**Category:** Ecosystem\
**Tags:** opam, dune\
**Created:** [July 31, 2023, 12:07am UTC](https://discuss.ocaml.org/t/opam-ci-failing-due-to-unused-dependency/12725 "2023-07-31T00:07:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yawaramin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yawaramin/32/3384_2.png) [@yawaramin](https://discuss.ocaml.org/u/yawaramin)\
**Post date:** [July 31, 2023, 12:07am UTC](https://discuss.ocaml.org/t/opam-ci-failing-due-to-unused-dependency/12725/1 "2023-07-31T00:07:00Z")

</div>

I am trying to submit a new version of the `decimal` library to the opam-repository, but some of the builds are failing, e.g.: [https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/6022c86c0e6a3f457613a41806a53521c63ed700/variant/compilers,4.08,ppx\_decimal.1.0.0,tests](https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/6022c86c0e6a3f457613a41806a53521c63ed700/variant/compilers,4.08,ppx_decimal.1.0.0,tests)

```auto
#=== ERROR while compiling ppx_decimal.1.0.0 ==================================#
# context 2.2.0~alpha2~dev | linux/x86_64 | ocaml-base-compiler.4.08.1 | pinned(https://github.com/yawaramin/ocaml-decimal/releases/download/v1.0.0/decimal-1.0.0.tbz)
# path ~/.opam/4.08/.opam-switch/build/ppx_decimal.1.0.0
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ppx_decimal -j 127 @install @runtest
# exit-code 1
# env-file ~/.opam/log/ppx_decimal-7-957229.env
# output-file ~/.opam/log/ppx_decimal-7-957229.out
### output ###
# File "test/dune", line 5, characters 21-29:
# 5 | (libraries alcotest angstrom decimal))
# ^^^^^^^^
# Error: Library "angstrom" not found.
# -> required by _build/default/test/decimal_test.exe
# -> required by alias test/runtest in test/dune:2

```

But the `angstrom` library is specified as a test dep for the `decimal` package: [https://github.com/yawaramin/ocaml-decimal/blob/46c02f6c5f600ac2887a745424826689d488369d/dune-project#L30](https://github.com/yawaramin/ocaml-decimal/blob/46c02f6c5f600ac2887a745424826689d488369d/dune-project#L30)

```auto
(package
 (name decimal)
  ...
 (depends
  (alcotest
   (and
    (>= 1.5.0)
    (< 2.0.0)
    :with-test))
  (angstrom
   (and
    (>= 0.15.0)
    (< 1.0.0)
    :with-test))...

```

It’s not specified as a dep of the `ppx_decimal` package because it’s not used there. I suppose technically, it’s not used by the `decimal` package either, only by the `test` dune component. But how do I tell dune that the `test` component belongs under the `decimal` package, so that it shouldn’t try to run it for the `ppx_decimal` package?

---

<div class="post-metadata">

**Author:** ![anmonteiro](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/anmonteiro/32/300_2.png) [@anmonteiro](https://discuss.ocaml.org/u/anmonteiro)\
**Post date:** [July 31, 2023, 12:18am UTC](https://discuss.ocaml.org/t/opam-ci-failing-due-to-unused-dependency/12725/2 "2023-07-31T00:18:43Z")

</div>

By specifying `(package decimal)` in your test stanza. Sent a PR: [Fix test failure on ppx\_decimal by anmonteiro · Pull Request #11 · yawaramin/ocaml-decimal · GitHub](https://github.com/yawaramin/ocaml-decimal/pull/11)
