Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Interpret strings as branches > semver constraints #715

Merged
merged 2 commits into from
Jul 7, 2017

Commits on Jul 6, 2017

  1. Interpret strings as branches > semver constraints

    When a user supplied string in an imported config file, or specified to
    dep ensure, can be interpreted multiple ways, prefer the branch over a
    semver constraint.
    
    In golang#710, glide.yaml specified v2 for https://github.com/go-mgo/mgo.
    When we assume that is a semver constraint, solve fails because the
    hinted revision in the lock (a commit on the v2 branch) doesn't satisfy
    the assumed constraint of ^2.0.0.
    
    The new preferred match order for the user string is:
    
    * revision
    * branch
    * semver constraint
    * tag
    
    I am giving preference of a semver constraint over a tag so that a bare
    version, 1.0.0, is interpreted more loosely with an implied caret,
    ^1.0.0, instead of the stricter exact match.
    carolynvs committed Jul 6, 2017
    Configuration menu
    Copy the full SHA
    c300e1c View commit details
    Browse the repository at this point in the history
  2. Select locked version compatible with the constraint

    When selecting a preferred version for a lock (before solve)
    if the constraint is a semver range, ensure the version
    selected is compatible.
    carolynvs committed Jul 6, 2017
    Configuration menu
    Copy the full SHA
    db62987 View commit details
    Browse the repository at this point in the history