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
ERROR: LoadError: empty intersection between Random@0.0.0 and project compatibility 1
here: fix random deps again · tlienart/Franklin.jl@ed33598 · GitHub
Is there a way to make both happy?
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).
Thanks @ericphanson; indeed there are package operations in the test env so what you say makes sense. Using
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.
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.