JuliaLang / Pkg.jl

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

Automatically add compat entries when adding deps to a package #3732

Closed IanButterworth closed 8 months ago

IanButterworth commented 8 months ago

Closes https://github.com/JuliaLang/Pkg.jl/issues/776

If the current environment is a package this makes pkg> add auto add compat entries for the new direct dependencies.

I don't think we'd want to make this standard practice for the default envs, hence being specific to packages, but maybe there's an argument that it should be done for unnamed environments other than the defaults? Like the envs stored alongside scripts.

The compat entries are set to be lower-bounded by the installed patch version (which makes this work for JLLs).
It feels safer than relying on semver and setting it to Base.thisminor(v).