Skip to content

Check stale test-only dependencies / stale extras #352

@jonas-schulze

Description

@jonas-schulze

Consider a package that declares test-only dependencies using [extras] and [targets], that has a stale test-only dependency. That is, an entry in [extras] that does not occur in [targets]. It would be nice if Aqua could detect those.

If the [extras] entry misses a [compat] bound, Aqua complains about it (🚀). If there is an [compat] entry without a corresponding [extras]/[deps]/[weakdeps] entry, Julia complains about it (🚀). However, no-one complains if a package listed in [compat] and [extras] isn't actually needed (💥).

Consider the following example where LinearAlgebra is the stale dependency:

name = "ListedInBoth"
uuid = "b8c62883-214e-4d91-9d2e-85c5e4e11f6e"
authors = ["Jonas Schulze <jschulze@mpi-magdeburg.mpg.de>"]
version = "0.1.0"

[compat]
LinearAlgebra = "1"
Test = "1"
julia = "1.10"

[extras]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]

Here, I would expect Aqua.test_stale_deps(ListedInBoth) to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions