I might have an idea for getting you the kind of reproducibility you’re looking for without any of the drawbacks of committing Manifest files, and within the limitations of the current Pkg
and standard tooling:
- Use TestEnv.jl to get a REPL with the test environment of your package. This should work whether you use
[extras]
ortest/Project.toml
. - Use
Pkg.status()
to print the packages and their resolved version numbers in the environment. This would include both explicit and implicit test dependencies - Create a file
test/install_supported.jl
where you usePkg.pin
commands to force all packages to the exact version shown earlier byPkg.status()
. You could probably write yourself a script to automate this process - At the top of
test/run_tests.jl
, conditionallyinclude
theinstall_supported.jl
file. You could make this conditional on environment variables and/orARGS
: BothPkg.test
and thejulia-runtest
actions allow passing arguments toPkg.test
- You might consider also creating a file
install_lowest_compat.jl
where you pin all packages to the minimum version specified in your packagescompat
bounds. - In CI, create different jobs as desired, e.g. to run the tests without any arguments (with the “latest” compatible packages, what users would generally experience), with the “supported” versions, and the “lowest compat” versions. Similarly, when testing locally, call
Pkg.test
with the appropriate options the switch between these cases - On a regular basis, e.g., before making a release, update the pinned “supported” versions to the latest versions. This is more tedious that using auto-genererated Manifest files, but presumably something that could be automated.