JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
616 stars 258 forks source link

Add funcionality to create compats from current status #3716

Closed KeithWM closed 8 months ago

KeithWM commented 8 months ago

Having learned that one ideally adds compats for all packages in use, it seems sensible for Pkg to implement some feature that automatically adds compats to your Project.toml based on your current environment status. This would be similar, but naturally better, than the behaviour of conda env list and pip freeze.

I'd say by default compats should be added as the current version withough any symbol (caret, tilde etc.) but skipping any packages that already contain a compat entry.

ufechner7 commented 8 months ago

The package https://github.com/ufechner7/PkgHelpers.jl provides this functionality. Of course it would be nice if Pkg would provide this natively. Please, create an issue for this package for any missing functionality.

KeithWM commented 8 months ago

That appears to be exactly what we want. I'm not entirely sure, but it might be better to keep such functionality outside Pkg to avoid the Pkg package, a requirement for many different things, from becoming bloated.