-
Notifications
You must be signed in to change notification settings - Fork 8
Downgrade action doesn't work with test/Project.toml #36
Description
In Julia <v1.13, one can add test dependencies using [extras] or in a test/Project.toml: https://pkgdocs.julialang.org/v1/creating-packages/#Test-specific-dependencies
In Julia v1.13, the [extras] approach is deprecated, and the recommended approach uses test/Project.toml with a test [workspace] and/or a [sources] entry, and with the package itself added as a test dependency. https://pkgdocs.julialang.org/dev/creating-packages/#Test-specific-dependencies
I've been moving my packages to a [workspace]-based workflow, but I haven't been able to figure out how to use this action with these packages. Here's a simple test package: https://github.com/sethaxen/DowngradeTestPackage.jl. It has two workflows. Both downgrade either just . or both . and test, and both either build . or build test before running tests.
Downgrade v1
Uses v1 of this action with various levels of strictness. See https://github.com/sethaxen/DowngradeTestPackage.jl/actions/runs/20269280645 for example results. To summarize the results, if we downgrade .,test and build ., then we succeed in downgrading test dependencies for all Julia versions and levels of strictness.
Downgrade v2
Uses the main branch of this action with various modes. See https://github.com/sethaxen/DowngradeTestPackage.jl/actions/runs/20269280613 for example results. There's no combination of arguments that succeeds in downgrading the test dependencies. If we try to downgrade test, then we get the error: unknown package UUID: 598b003f-0677-49cf-8d2a-39b1658b755a, which is the UUID of the package itself.
Presumably this happens because the package is not registered, but I've seen this happen also for registered packages when the compat bound for the package in test/Project.toml doesn't match a previous release of the package (e.g. v0.2.0 is released, the test/Project.toml has a compat bound of unreleased v0.3).
Yet another issue, which I can only recreate for a registered package, is that when the downgrade action is run on test, it installs in the package manifest an old release of the package instead of the local version. One can't even resolve the environment then, because Pkg expects the package manifest to contain the package itself.