Commit 67783935 authored by Alan Donovan's avatar Alan Donovan

go/constants: rename go/exact to go/constants

since the "precision" parameter means constant arithmetic is not
necessarily exact.

As requested by gri, within go/types, the local import name 'exact'
has been kept, to reduce the diff with the x/tools branch.  This may
be changed later.

Since the go/types.bash script was already obsolete, I added a comment
to this effect.

Tested with all.bash.

Change-Id: I45153688d9d8afa8384fb15229b0124c686059b4
Reviewed-on: https://go-review.googlesource.com/9242Reviewed-by: 's avatarRob Pike <r@golang.org>
parent ca9128f1
......@@ -340,11 +340,11 @@ var pkgDeps = map[string][]string{
// dependencies. Do not simply update them in situ.
"container/heap": {"sort"},
"debug/plan9obj": {"encoding/binary", "errors", "fmt", "io", "os"},
"go/exact": {"fmt", "go/token", "math/big", "strconv"},
"go/constants": {"fmt", "go/token", "math/big", "strconv"},
"go/format": {"bytes", "fmt", "go/ast", "go/parser", "go/printer", "go/token", "internal/format", "io"},
"go/importer": {"go/internal/gcimporter", "go/types", "io", "runtime"},
"go/internal/gcimporter": {"bufio", "errors", "fmt", "go/build", "go/exact", "go/token", "go/types", "io", "os", "path/filepath", "strconv", "strings", "text/scanner"},
"go/types": {"bytes", "container/heap", "fmt", "go/ast", "go/exact", "go/parser", "go/token", "io", "math", "path", "sort", "strconv", "strings", "sync", "unicode"},
"go/internal/gcimporter": {"bufio", "errors", "fmt", "go/build", "go/constants", "go/token", "go/types", "io", "os", "path/filepath", "strconv", "strings", "text/scanner"},
"go/types": {"bytes", "container/heap", "fmt", "go/ast", "go/constants", "go/parser", "go/token", "io", "math", "path", "sort", "strconv", "strings", "sync", "unicode"},
"image/internal/imageutil": {"image"},
"internal/format": {"bytes", "go/ast", "go/parser", "go/printer", "go/token", "strings"},
"internal/mime": {"bytes", "encoding/base64", "errors", "fmt", "io", "io/ioutil", "strconv", "strings", "unicode"},
......
......@@ -4,7 +4,7 @@
// +build !go1.4
package exact
package constants
import (
"math"
......
......@@ -4,7 +4,7 @@
// +build go1.4
package exact
package constants
import "math/big"
......
......@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package exact implements Values representing untyped
// Package constants implements Values representing untyped
// Go constants and the corresponding operations. Values
// and operations have unlimited precision.
// and operations may have arbitrary or unlimited precision.
//
// A special Unknown value may be used when a value
// is unknown due to an error. Operations on unknown
// values produce unknown values unless specified
// otherwise.
//
package exact // import "go/exact"
package constants // import "go/constants"
import (
"fmt"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package exact
package constants
import (
"go/token"
......
......@@ -18,7 +18,7 @@ import (
"strings"
"text/scanner"
"go/exact"
exact "go/constants"
"go/types"
)
......
......@@ -9,6 +9,10 @@
# original sources in x/tools. Imports are renamed as needed.
#
# Delete this script once go/exact and go/types don't exist anymore in x/tools.
#
# NOTE(adonovan): the standard packages have intentionally diverged
# from x/tools, so this script is a unlikely to be useful. Upstream
# changes should be cherry-picked in to the standard library.
set -e
......
......@@ -28,7 +28,7 @@ import (
"bytes"
"fmt"
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
)
......
......@@ -8,7 +8,7 @@ package types
import (
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
)
......
......@@ -8,7 +8,7 @@ package types
import (
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
)
......
......@@ -6,7 +6,7 @@
package types
import "go/exact"
import exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
// Conversion type-checks the conversion T(x).
// The result is in x.
......
......@@ -6,7 +6,7 @@ package types
import (
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
)
......
......@@ -9,7 +9,7 @@ package types
import (
"fmt"
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
"math"
)
......
......@@ -8,7 +8,7 @@ import (
"bytes"
"fmt"
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
)
......
......@@ -9,7 +9,7 @@ package types
import (
"bytes"
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
)
......
......@@ -7,7 +7,7 @@ package types
import (
"fmt"
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
pathLib "path"
"strconv"
......
......@@ -31,7 +31,7 @@ func TestSelf(t *testing.T) {
conf := Config{Importer: importer.Default()}
_, err = conf.Check("go/types", fset, files, nil)
if err != nil {
// Importing go.tools/go/exact doensn't work in the
// Importing go/constants doesn't work in the
// build dashboard environment. Don't report an error
// for now so that the build remains green.
// TODO(gri) fix this
......
......@@ -9,7 +9,7 @@ package types
import (
"fmt"
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
)
......
......@@ -8,7 +8,7 @@ package types
import (
"go/ast"
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
"sort"
"strconv"
......
......@@ -7,7 +7,7 @@
package types
import (
"go/exact"
exact "go/constants" // Renamed to reduce diffs from x/tools. TODO: remove
"go/token"
"strings"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment