Skip to content

Commit

Permalink
internal/semver: copy from golang.org/x/mod
Browse files Browse the repository at this point in the history
All files copied from v0.6.0.

This means that the CUE-related modules functionality
depends only on code in this repository.

For #2330.

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: I29b9de0618c5cabbb05bbbd32b2f85911e67be01
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1168634
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
  • Loading branch information
rogpeppe committed Sep 26, 2023
1 parent b4583de commit a9a6965
Show file tree
Hide file tree
Showing 8 changed files with 604 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cue/load/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"cuelang.org/go/internal/mod/modfile"
"cuelang.org/go/internal/mod/module"
"cuelang.org/go/internal/mod/mvs"
"golang.org/x/mod/semver"
"cuelang.org/go/internal/mod/semver"
)

// loadModule loads the module file, resolves and downloads module
Expand Down
2 changes: 1 addition & 1 deletion internal/mod/modfile/modfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"fmt"
"sync"

"golang.org/x/mod/semver"
"cuelang.org/go/internal/mod/semver"

"cuelang.org/go/cue"
"cuelang.org/go/cue/cuecontext"
Expand Down
2 changes: 1 addition & 1 deletion internal/mod/modregistry/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (

"cuelabs.dev/go/oci/ociregistry"
"cuelabs.dev/go/oci/ociregistry/ociclient"
"cuelang.org/go/internal/mod/semver"
digest "github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/mod/semver"

"cuelang.org/go/internal/mod/modfile"
"cuelang.org/go/internal/mod/module"
Expand Down
2 changes: 1 addition & 1 deletion internal/mod/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"sort"
"strings"

"golang.org/x/mod/semver"
"cuelang.org/go/internal/mod/semver"
)

// A Version (for clients, a module.Version) is defined by a module path and version pair.
Expand Down
2 changes: 1 addition & 1 deletion internal/mod/module/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"unicode"
"unicode/utf8"

"golang.org/x/mod/semver"
"cuelang.org/go/internal/mod/semver"
)

// The following regular expressions come from https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pulling-manifests
Expand Down
2 changes: 1 addition & 1 deletion internal/mod/module/versions.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package module

import (
"golang.org/x/mod/semver"
"cuelang.org/go/internal/mod/semver"
)

// Versions implements mvs.Versions[Version].
Expand Down
Loading

0 comments on commit a9a6965

Please sign in to comment.