# Compat bounds for stdlibs that are test dependencies?

**URL:** <https://discourse.julialang.org/t/compat-bounds-for-stdlibs-that-are-test-dependencies/105852>\
**Category:** General Usage\
**Tags:** question, testing, pkg\
**Created:** [November 6, 2023, 10:06am UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlibs-that-are-test-dependencies/105852 "2023-11-06T10:06:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [November 6, 2023, 10:06am UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlibs-that-are-test-dependencies/105852/1 "2023-11-06T10:06:35Z")

</div>

Currently, one needs to add compat bounds for stdlibs that are direct dependencies. Should one also add compat bounds for stdlibs that are only test dependencies, to avoid fetching breaking versions in the CI runs?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [November 6, 2023, 9:38pm UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlibs-that-are-test-dependencies/105852/2 "2023-11-06T21:38:02Z")

</div>

I seem to remember Julia ignores compat bounds on any package which isn’t a direct dependency (perhaps weakdep too), if that’s correct ([evidence](https://github.com/JuliaParallel/MPI.jl/issues/749#issuecomment-1641479640)) then any extra compat bound would be useless.

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [November 6, 2023, 11:08pm UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlibs-that-are-test-dependencies/105852/3 "2023-11-06T23:08:45Z")

</div>

Julia/Pkg respects compat entries on test deps.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [November 6, 2023, 11:36pm UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlibs-that-are-test-dependencies/105852/4 "2023-11-06T23:36:32Z")

</div>

Then can you explain the linked evidence above? Or that was has been fixed in recent versione?

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [November 6, 2023, 11:40pm UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlibs-that-are-test-dependencies/105852/5 "2023-11-06T23:40:04Z")

</div>

I wonder if there’s a bug if you mark a test dep as a weak dep also.

But it definitely works in the “regular” case (where nothing is a weak dep), because I use it in the Pkg test suite itself. E.g. [https://github.com/JuliaLang/Pkg.jl/blob/master/test/test\_packages/force\_latest\_compatible\_version/OldOnly2/Project.toml](https://github.com/JuliaLang/Pkg.jl/blob/master/test/test_packages/force_latest_compatible_version/OldOnly2/Project.toml)
