Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
cue: use v2 of abitrary precision decimal package
Browse files Browse the repository at this point in the history
This fixes a major bug that currently does not
affect cue but is dangerous to let linger.

Change-Id: Ibd3e7581fa1fc399aa0ad45cb3f0bb30e334b034
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2363
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
  • Loading branch information
mpvl committed Jun 29, 2019
1 parent 4954491 commit 1700232
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cue/binop.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"time"

"cuelang.org/go/cue/token"
"github.com/cockroachdb/apd"
"github.com/cockroachdb/apd/v2"
)

// binSrc returns a baseValue representing a binary expression of the given
Expand Down
2 changes: 1 addition & 1 deletion cue/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package cue

import (
"github.com/cockroachdb/apd"
"github.com/cockroachdb/apd/v2"
)

// context manages evaluation state.
Expand Down
2 changes: 1 addition & 1 deletion cue/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"cuelang.org/go/cue/ast"
"cuelang.org/go/cue/token"
"github.com/cockroachdb/apd"
"github.com/cockroachdb/apd/v2"
)

func doEval(m options) bool {
Expand Down
2 changes: 1 addition & 1 deletion cue/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"cuelang.org/go/cue/parser"
"cuelang.org/go/cue/token"
"cuelang.org/go/internal"
"github.com/cockroachdb/apd"
"github.com/cockroachdb/apd/v2"
)

// This file contains functionality for converting Go to CUE.
Expand Down
2 changes: 1 addition & 1 deletion cue/lit.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"cuelang.org/go/cue/ast"
"cuelang.org/go/cue/literal"
"github.com/cockroachdb/apd"
"github.com/cockroachdb/apd/v2"
)

type numInfo struct {
Expand Down
2 changes: 1 addition & 1 deletion cue/lit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"

"cuelang.org/go/cue/ast"
"github.com/cockroachdb/apd"
"github.com/cockroachdb/apd/v2"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
)
Expand Down
2 changes: 1 addition & 1 deletion cue/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"cuelang.org/go/cue/ast"
"cuelang.org/go/cue/errors"
"cuelang.org/go/cue/token"
"github.com/cockroachdb/apd"
"github.com/cockroachdb/apd/v2"
)

// Kind determines the underlying type of a Value.
Expand Down
2 changes: 1 addition & 1 deletion cue/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"cuelang.org/go/cue/ast"
"cuelang.org/go/cue/token"
"github.com/cockroachdb/apd"
"github.com/cockroachdb/apd/v2"
)

type value interface {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module cuelang.org/go

require (
github.com/cockroachdb/apd v1.1.0
github.com/cockroachdb/apd v1.1.0 // indirect
github.com/cockroachdb/apd/v2 v2.0.1
github.com/emicklei/proto v1.6.11
github.com/ghodss/yaml v1.0.0
github.com/google/go-cmp v0.2.0
github.com/kr/pretty v0.1.0
github.com/kylelemons/godebug v1.1.0
github.com/lib/pq v1.0.0 // indirect
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de
github.com/pkg/errors v0.8.0 // indirect
github.com/retr0h/go-gilt v0.0.0-20190206215556-f73826b37af2
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/cockroachdb/apd/v2 v2.0.1 h1:y1Rh3tEU89D+7Tgbw+lp52T6p/GJLpDmNvr10UWqLTE=
github.com/cockroachdb/apd/v2 v2.0.1/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emicklei/proto v1.6.11 h1:KZHE0+iwVLth2D/K8jat9rs70K6TFWyol8ihrOdrbM0=
github.com/emicklei/proto v1.6.11/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A=
Expand Down

0 comments on commit 1700232

Please sign in to comment.