Pkg.jl icon indicating copy to clipboard operation
Pkg.jl copied to clipboard

Add automatically compat entry when adding a package

Open saschatimme opened this issue 5 years ago • 3 comments

Assume I install StaticArrays in my current project

(v0.7) pkg> add StaticArrays
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
  [90137ffa] + StaticArrays v0.8.3
  Updating `~/.julia/environments/v0.7/Manifest.toml`
 [no changes]

I think that then automatically an entry to [compat] should be added limiting to the current (semver) major version, i.e.,

[compat]
StaticArrays = "0.8.3"

With this, you (as a user or package author) have to explicitly upgrade your dependencies to a new major version and do not run into the problem of an incidentally broken package or script.

saschatimme avatar Sep 22 '18 10:09 saschatimme

Yes, this is the plan for future versions.

StefanKarpinski avatar Sep 22 '18 16:09 StefanKarpinski

Is there any reason this hasn't gained more traction/are there plans to implement this in the near future? :^)

twavv avatar Jan 20 '20 20:01 twavv

Same question here... Any update on this issue?

ufechner7 avatar Aug 14 '22 23:08 ufechner7