Constraint solving - sinopiaolive/package-manager GitHub Wiki

Things we came up with:

  • Stable ranges include beta versions, but we only pick betas if we have to (they get prioritized to the bottom). This prevents "beta jumping" (using 1.1.0-beta.1 to satisfy ^1.0.0-beta.1 even though 1.1.0 is available).

  • Print a warning if we depend on A ^1.0.0 (stable range) but another dependency forces a beta version to be used (A >= 1.1.0-beta.1).

    • This says "if we depend" rather than "if anyone depends" so that the warning is actionable/silenceable: We can fix it by bumping our own dependency to ^1.1.0-beta.1.)
    • Q: Also warn if we "beta jump", e.g. if we depend on A ^1.0.0-beta.1 but a dependency forces A 1.1.0-beta.1 even though A 1.1.0 exists?
  • Q, perhaps Yehuda knows: Is the following Bundler behavior a feature or a limitation of its solver? When we depend on A ^1.0.0 and B ^1.0.0, and both are satisfiable with stable versions, but the latest B is only satisfiable with a beta A, then Bundler uses the latest B and a beta A, rather than holding back B. (JL: "Pro: Lets B author ship a beta A dependency. Con: Unclear how to codify this behavior as a consistent rule set.")