JuliaCI / PkgTemplates.jl

Create new Julia packages, the easy way
https://juliaci.github.io/PkgTemplates.jl
MIT License
635 stars 101 forks source link

compat entry for Test #466

Open putianyi889 opened 6 months ago

putianyi889 commented 6 months ago

The auto-generated Project.toml doesn't pass Aqua test:

PkgName [uuid] does not declare a compat entry for the following extras:
1-element Vector{Base.PkgId}:
 Test [8dfed614-e22c-5e08-85e1-65c5234f0b40]
gdalle commented 6 months ago

Good catch! Do you want to try and fix it in a PR? I can help

putianyi889 commented 6 months ago

Good catch! Do you want to try and fix it in a PR? I can help

I'd like to, but I'm not sure if I'll need to change the definition of Template as it stores the Julia version.

gdalle commented 6 months ago

No, I think it just requires editing the Test plugin. Two cases to consider: separate Project.toml file or [extras] section in the main one. I think in both cases, you should be able to set the version for Test with Pkg.compat: https://pkgdocs.julialang.org/v1/api/#Pkg.compat

The relevant lines to edit are here:

https://github.com/JuliaCI/PkgTemplates.jl/blob/805bb7cfe158ab92ba76af3f2af5d7225f150714/src/plugins/tests.jl#L102-L153