# Compat bounds for stdlib and empty intersection issue on CI

**URL:** <https://discourse.julialang.org/t/compat-bounds-for-stdlib-and-empty-intersection-issue-on-ci/105898>\
**Category:** General Usage\
**Tags:** pkg, compatibility\
**Created:** [November 7, 2023, 12:05pm UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlib-and-empty-intersection-issue-on-ci/105898 "2023-11-07T12:05:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [November 7, 2023, 12:05pm UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlib-and-empty-intersection-issue-on-ci/105898/1 "2023-11-07T12:05:25Z")

</div>

I was trying to do a patch release for Franklin but the registry stopped me from doing this indicating that a bunch of stdlib libraries (Dates, Logging, Random, …) did not have compat bounds and that they should. So I added compat bounds `"1"` for all of them, then re-tried. Registry was happy but CI wasn’t.

I now have my tests failing on CI with

```julia
ERROR: LoadError: empty intersection between Random@0.0.0 and project compatibility 1

```

here: [fix random deps again · tlienart/Franklin.jl@ed33598 · GitHub](https://github.com/tlienart/Franklin.jl/actions/runs/6784117581/job/18439769060#step:6:222)

Is there a way to make both happy?

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [November 7, 2023, 12:13pm UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlib-and-empty-intersection-issue-on-ci/105898/2 "2023-11-07T12:13:38Z")

</div>

It is a bit of a mess tbh; I think you are likely doing Pkg operations on the test environment (is that right?), and in that case, Pkg treats the stdlibs as v0.0.0 on many Julia versions, and therefore needs the compat to be `="<0.0.1, 1"` for all stdlibs in your package AND all of your dependencies, recursively. That either means a ton of PRs to dependencies to loosen the bounds in that way, or to avoid doing any pkg operations on the test env. (Note it seems fine if you create a new env with `Pkg.activate`, add packages there, and then switch back).

---

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [November 7, 2023, 12:20pm UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlib-and-empty-intersection-issue-on-ci/105898/3 "2023-11-07T12:20:19Z")

</div>

Thanks @ericphanson; indeed there are package operations in the test env so what you say makes sense. Using

```julia
Dates = "<0.0.1, 1"
Logging = "<0.0.1, 1"
Markdown = "<0.0.1, 1"
Pkg = "<0.0.1, 1"
REPL = "<0.0.1, 1"
Random = "<0.0.1, 1"

```

is super ugly but does seem to work.

---

<div class="post-metadata">

**Author:** ![lxvm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lxvm/32/50010_2.png) [@lxvm](https://discourse.julialang.org/u/lxvm)\
**Post date:** [November 7, 2023, 3:17pm UTC](https://discourse.julialang.org/t/compat-bounds-for-stdlib-and-empty-intersection-issue-on-ci/105898/4 "2023-11-07T15:17:14Z")

</div>

In Integrals.jl, we were making a breaking release and moved packages in subdirs (e.g. `lib/IntegralsCuba.jl`) to package extensions to solve this issue without adding compat entries to dependencies. Just sharing in case it helps anyone.
