|
|
|
|
|
by pa7ch
2958 days ago
|
|
Minor correction: MVS requires modules to specify the minimum version to use of a module. The algorithm will then select the newest among those based on the idea that semver is forward compatible among minor versions. The name minimal version selection throws people off. Other algorithms would select the newest release within a major version even if no module has ever tested it and it was released 5 seconds ago. When authors do make incompatible changes and MVS selects a broken dependency, as expected, there are manual escape hatches. More complicated NP complete algo's would have more of an automated answer here by allowing dependencies to have boolean constraints (greater then X, less then Y, not Z etc.) on version so that there is this collaborative summation of constraints to work around authors violating semver or bugs. To summerize poorly: It seems Sam Boyer regrets that dep didn't do what vgo does by default, but believes that a SAT solver could kinda do MVS for the happy path but still solve against the introduction of boolean constraints. Personally, I'd like to let vgo play out a bit, I'm not convinced boolean constraints are something I really want imposed on me by my dependencies. More info for those who are looking for more context:
https://research.swtch.com/vgo
https://github.com/golang/go/issues/24301 Whether you agree or disagree, its novel research in this field and excellent technical writing worth reading in its entirety over a cup of coffee. |
|
[1] https://research.swtch.com/cargo-newest.html