From 84b867b9c9e241ee433f899ccd97afd2f8e456f3 Mon Sep 17 00:00:00 2001 From: Philip Potter Date: Tue, 16 Jun 2020 21:41:47 +0100 Subject: [PATCH] Release v4.0.0 (#47) --- CHANGELOG.md | 29 ++++++++++++++++++++++++++++- README.md | 2 +- binary/cbor.go | 2 +- binary/performance_test.go | 10 +++++----- binary/semantic_hash.go | 2 +- cmd/main.go | 8 ++++---- core/ast.go | 2 +- core/builtins.go | 2 +- core/builtins_test.go | 4 ++-- core/equivalence_test.go | 2 +- core/eval.go | 2 +- core/eval_test.go | 2 +- core/quote.go | 2 +- core/quote_test.go | 2 +- core/testing.go | 2 +- core/typecheck.go | 2 +- core/typecheck_test.go | 2 +- example_function_test.go | 2 +- example_nested_test.go | 2 +- example_tagged_test.go | 2 +- example_test.go | 2 +- go.mod | 2 +- imports/cache.go | 4 ++-- imports/imports.go | 10 +++++----- imports/imports_test.go | 6 +++--- internal/gubbins.go | 2 +- parser/internal/dhall.go | 2 +- parser/internal/dhall.peg | 2 +- parser/internal/multiline.go | 2 +- parser/internal/multiline_test.go | 2 +- parser/parser.go | 4 ++-- parser/parser_test.go | 6 +++--- property_test.go | 6 +++--- regression_test.go | 4 ++-- spec_test.go | 10 +++++----- term/fetchable_test.go | 4 ++-- unmarshal.go | 8 ++++---- unmarshal_test.go | 6 +++--- 38 files changed, 96 insertions(+), 69 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14eadd4..0e0ba90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,34 @@ # Changelog ## [Unreleased] -[Unreleased]: https://github.com/philandstuff/dhall-golang/compare/v3.0.0...HEAD +[Unreleased]: https://github.com/philandstuff/dhall-golang/compare/v4.0.0...HEAD + +## [4.0.0] - 2020-06-16 +[4.0.0]: https://github.com/philandstuff/dhall-golang/compare/v3.0.0...v4.0.0 + +This brings dhall-golang up to version 17.0.0 of the Dhall standard. +Again the standard had breaking changes, so this release is a major +version bump. + +Thanks to @lisael for their contributions to this release. + +### Breaking changes + + * Language changes: + * [Remove Optional/build and Optional/fold](https://github.com/dhall-lang/dhall-lang/pull/1014) + +### Added + + * Language changes: + * [Allow quoted labels to be empty](https://github.com/dhall-lang/dhall-lang/pull/980) + +### Fixed + + * Fix potential stack overflow in typechecker (#40) + * When typechecking certain pathological expressions, the + typechecker would get into an infinite loop until it exhausted + the stack. + * Fix error messages when `x === y` fails to typecheck (#39) ## [3.0.0] - 2020-05-11 [3.0.0]: https://github.com/philandstuff/dhall-golang/compare/v2.0.0...v3.0.0 diff --git a/README.md b/README.md index 7b03510..3ec25df 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ import ( "fmt" "io/ioutil" - "github.com/philandstuff/dhall-golang/v3" + "github.com/philandstuff/dhall-golang/v4" ) // Config can be a fairly arbitrary Go datatype. You would put your diff --git a/binary/cbor.go b/binary/cbor.go index 0ba0cf9..4478519 100644 --- a/binary/cbor.go +++ b/binary/cbor.go @@ -8,7 +8,7 @@ import ( "path" "github.com/fxamacker/cbor/v2" - . "github.com/philandstuff/dhall-golang/v3/term" + . "github.com/philandstuff/dhall-golang/v4/term" ) var nameToBuiltin = map[string]Term{ diff --git a/binary/performance_test.go b/binary/performance_test.go index 495a07a..8d4c39e 100644 --- a/binary/performance_test.go +++ b/binary/performance_test.go @@ -7,11 +7,11 @@ import ( "path" "testing" - "github.com/philandstuff/dhall-golang/v3/binary" - "github.com/philandstuff/dhall-golang/v3/core" - "github.com/philandstuff/dhall-golang/v3/imports" - "github.com/philandstuff/dhall-golang/v3/internal" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/binary" + "github.com/philandstuff/dhall-golang/v4/core" + "github.com/philandstuff/dhall-golang/v4/imports" + "github.com/philandstuff/dhall-golang/v4/internal" + "github.com/philandstuff/dhall-golang/v4/term" ) func BenchmarkDecodeLargeExpression(b *testing.B) { diff --git a/binary/semantic_hash.go b/binary/semantic_hash.go index be2d953..61f60ca 100644 --- a/binary/semantic_hash.go +++ b/binary/semantic_hash.go @@ -4,7 +4,7 @@ import ( "bytes" "crypto/sha256" - "github.com/philandstuff/dhall-golang/v3/core" + "github.com/philandstuff/dhall-golang/v4/core" ) // SemanticHash returns the semantic hash of an evaluated expression. diff --git a/cmd/main.go b/cmd/main.go index f083d20..93db3de 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -6,10 +6,10 @@ import ( "log" "os" - "github.com/philandstuff/dhall-golang/v3/binary" - "github.com/philandstuff/dhall-golang/v3/core" - "github.com/philandstuff/dhall-golang/v3/imports" - "github.com/philandstuff/dhall-golang/v3/parser" + "github.com/philandstuff/dhall-golang/v4/binary" + "github.com/philandstuff/dhall-golang/v4/core" + "github.com/philandstuff/dhall-golang/v4/imports" + "github.com/philandstuff/dhall-golang/v4/parser" ) func main() { diff --git a/core/ast.go b/core/ast.go index 14b1c57..3f80cef 100644 --- a/core/ast.go +++ b/core/ast.go @@ -4,7 +4,7 @@ import ( "fmt" "math" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) // A Value is a Dhall value in beta-normal form. You can think of diff --git a/core/builtins.go b/core/builtins.go index 58138c0..868b47b 100644 --- a/core/builtins.go +++ b/core/builtins.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) func (naturalBuild) Call(x Value) Value { diff --git a/core/builtins_test.go b/core/builtins_test.go index a9e1da3..0b051b9 100644 --- a/core/builtins_test.go +++ b/core/builtins_test.go @@ -3,8 +3,8 @@ package core_test import ( . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" - "github.com/philandstuff/dhall-golang/v3/core" - "github.com/philandstuff/dhall-golang/v3/parser" + "github.com/philandstuff/dhall-golang/v4/core" + "github.com/philandstuff/dhall-golang/v4/parser" ) var _ = DescribeTable("ArgType of builtins", func(src, typ string) { diff --git a/core/equivalence_test.go b/core/equivalence_test.go index 1167b7c..2ec8e59 100644 --- a/core/equivalence_test.go +++ b/core/equivalence_test.go @@ -5,7 +5,7 @@ import ( . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" "github.com/onsi/gomega/types" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) // Ensure that alphaMatcher is a valid GomegaMatcher diff --git a/core/eval.go b/core/eval.go index 7261200..35be0fe 100644 --- a/core/eval.go +++ b/core/eval.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) type env map[string][]Value diff --git a/core/eval_test.go b/core/eval_test.go index 8044fa1..f8980e7 100644 --- a/core/eval_test.go +++ b/core/eval_test.go @@ -3,7 +3,7 @@ package core import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) var _ = Describe("Eval", func() { diff --git a/core/quote.go b/core/quote.go index 7ae1b76..3c03ab1 100644 --- a/core/quote.go +++ b/core/quote.go @@ -3,7 +3,7 @@ package core import ( "fmt" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) // Quote takes the Value v and turns it back into a Term. diff --git a/core/quote_test.go b/core/quote_test.go index 01d6af7..6810159 100644 --- a/core/quote_test.go +++ b/core/quote_test.go @@ -3,7 +3,7 @@ package core import ( . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) var _ = DescribeTable("Quote", diff --git a/core/testing.go b/core/testing.go index a9aa58b..bf42337 100644 --- a/core/testing.go +++ b/core/testing.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) // GomegaMatcher is a copy of diff --git a/core/typecheck.go b/core/typecheck.go index 1ced910..a4af346 100644 --- a/core/typecheck.go +++ b/core/typecheck.go @@ -3,7 +3,7 @@ package core import ( "fmt" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) type context map[string][]Value diff --git a/core/typecheck_test.go b/core/typecheck_test.go index 4c83b1b..d8db372 100644 --- a/core/typecheck_test.go +++ b/core/typecheck_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) var _ = DescribeTable("functionCheck", diff --git a/example_function_test.go b/example_function_test.go index 33b6bb9..d0bb2ff 100644 --- a/example_function_test.go +++ b/example_function_test.go @@ -3,7 +3,7 @@ package dhall_test import ( "fmt" - "github.com/philandstuff/dhall-golang/v3" + "github.com/philandstuff/dhall-golang/v4" ) // Config is the struct we want to unmarshal from Dhall diff --git a/example_nested_test.go b/example_nested_test.go index 93dc322..5288ab7 100644 --- a/example_nested_test.go +++ b/example_nested_test.go @@ -3,7 +3,7 @@ package dhall_test import ( "fmt" - "github.com/philandstuff/dhall-golang/v3" + "github.com/philandstuff/dhall-golang/v4" ) // NestedConfig is the struct we want to unmarshal from Dhall diff --git a/example_tagged_test.go b/example_tagged_test.go index 555babe..298aa18 100644 --- a/example_tagged_test.go +++ b/example_tagged_test.go @@ -3,7 +3,7 @@ package dhall_test import ( "fmt" - "github.com/philandstuff/dhall-golang/v3" + "github.com/philandstuff/dhall-golang/v4" ) // TaggedMessage is the struct we want to unmarshal from Dhall diff --git a/example_test.go b/example_test.go index f005a05..ca0517c 100644 --- a/example_test.go +++ b/example_test.go @@ -3,7 +3,7 @@ package dhall_test import ( "fmt" - "github.com/philandstuff/dhall-golang/v3" + "github.com/philandstuff/dhall-golang/v4" ) // Message is the struct we want to unmarshal from Dhall diff --git a/go.mod b/go.mod index 3758279..efd5bc3 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/philandstuff/dhall-golang/v3 +module github.com/philandstuff/dhall-golang/v4 require ( github.com/fxamacker/cbor/v2 v2.2.1-0.20200511212021-28e39be4a84f diff --git a/imports/cache.go b/imports/cache.go index a1cb860..9a5e71d 100644 --- a/imports/cache.go +++ b/imports/cache.go @@ -10,8 +10,8 @@ import ( "os" "path" - "github.com/philandstuff/dhall-golang/v3/binary" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/binary" + "github.com/philandstuff/dhall-golang/v4/term" ) // DhallCache is an interface for caching implementations. diff --git a/imports/imports.go b/imports/imports.go index ff3cce0..3cd510d 100644 --- a/imports/imports.go +++ b/imports/imports.go @@ -4,11 +4,11 @@ import ( "bytes" "fmt" - "github.com/philandstuff/dhall-golang/v3/binary" - "github.com/philandstuff/dhall-golang/v3/core" - "github.com/philandstuff/dhall-golang/v3/parser" - "github.com/philandstuff/dhall-golang/v3/term" - . "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/binary" + "github.com/philandstuff/dhall-golang/v4/core" + "github.com/philandstuff/dhall-golang/v4/parser" + "github.com/philandstuff/dhall-golang/v4/term" + . "github.com/philandstuff/dhall-golang/v4/term" ) // Load takes a Term and resolves all imports diff --git a/imports/imports_test.go b/imports/imports_test.go index d664a71..d25f09b 100644 --- a/imports/imports_test.go +++ b/imports/imports_test.go @@ -5,9 +5,9 @@ import ( "net/http" "os" - . "github.com/philandstuff/dhall-golang/v3/imports" - . "github.com/philandstuff/dhall-golang/v3/internal" - . "github.com/philandstuff/dhall-golang/v3/term" + . "github.com/philandstuff/dhall-golang/v4/imports" + . "github.com/philandstuff/dhall-golang/v4/internal" + . "github.com/philandstuff/dhall-golang/v4/term" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/internal/gubbins.go b/internal/gubbins.go index f7463ad..897b0dd 100644 --- a/internal/gubbins.go +++ b/internal/gubbins.go @@ -10,7 +10,7 @@ package internal import ( "net/url" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) func NewImport(fetchable term.Fetchable, mode term.ImportMode) term.Import { diff --git a/parser/internal/dhall.go b/parser/internal/dhall.go index a38163d..1b9c640 100644 --- a/parser/internal/dhall.go +++ b/parser/internal/dhall.go @@ -21,7 +21,7 @@ import ( "unicode" "unicode/utf8" - . "github.com/philandstuff/dhall-golang/v3/term" + . "github.com/philandstuff/dhall-golang/v4/term" ) // Helper function for parsing all the operator parsing blocks diff --git a/parser/internal/dhall.peg b/parser/internal/dhall.peg index 1ec76c0..9116032 100644 --- a/parser/internal/dhall.peg +++ b/parser/internal/dhall.peg @@ -29,7 +29,7 @@ import ( "unicode" "unicode/utf8" ) -import . "github.com/philandstuff/dhall-golang/v3/term" +import . "github.com/philandstuff/dhall-golang/v4/term" // Helper function for parsing all the operator parsing blocks // see OrExpression for an example of how this is used diff --git a/parser/internal/multiline.go b/parser/internal/multiline.go index 42baa03..b9a22c1 100644 --- a/parser/internal/multiline.go +++ b/parser/internal/multiline.go @@ -3,7 +3,7 @@ package internal import ( "strings" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/term" ) // removeLeadingCommonIndent removes the common leading indent from a diff --git a/parser/internal/multiline_test.go b/parser/internal/multiline_test.go index 821355a..846c783 100644 --- a/parser/internal/multiline_test.go +++ b/parser/internal/multiline_test.go @@ -1,7 +1,7 @@ package internal import ( - . "github.com/philandstuff/dhall-golang/v3/term" + . "github.com/philandstuff/dhall-golang/v4/term" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/parser/parser.go b/parser/parser.go index 35e5a9f..dbd7f1f 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -4,8 +4,8 @@ import ( "errors" "io" - "github.com/philandstuff/dhall-golang/v3/parser/internal" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/parser/internal" + "github.com/philandstuff/dhall-golang/v4/term" ) //go:generate pigeon -optimize-grammar -optimize-parser -o internal/dhall.go internal/dhall.peg diff --git a/parser/parser_test.go b/parser/parser_test.go index 421e7d8..3beb30a 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -3,9 +3,9 @@ package parser_test import ( "math" - . "github.com/philandstuff/dhall-golang/v3/internal" - "github.com/philandstuff/dhall-golang/v3/parser" - . "github.com/philandstuff/dhall-golang/v3/term" + . "github.com/philandstuff/dhall-golang/v4/internal" + "github.com/philandstuff/dhall-golang/v4/parser" + . "github.com/philandstuff/dhall-golang/v4/term" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/property_test.go b/property_test.go index 2d7693d..58fd6c0 100644 --- a/property_test.go +++ b/property_test.go @@ -10,9 +10,9 @@ import ( "github.com/leanovate/gopter/gen" "github.com/leanovate/gopter/prop" - "github.com/philandstuff/dhall-golang/v3/core" - "github.com/philandstuff/dhall-golang/v3/parser" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/core" + "github.com/philandstuff/dhall-golang/v4/parser" + "github.com/philandstuff/dhall-golang/v4/term" ) var ( diff --git a/regression_test.go b/regression_test.go index 1192771..a8de0fb 100644 --- a/regression_test.go +++ b/regression_test.go @@ -4,8 +4,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" - . "github.com/philandstuff/dhall-golang/v3/core" - "github.com/philandstuff/dhall-golang/v3/parser" + . "github.com/philandstuff/dhall-golang/v4/core" + "github.com/philandstuff/dhall-golang/v4/parser" ) func parseAndTypecheckTest(source string, expectedTypeSource string) { diff --git a/spec_test.go b/spec_test.go index 4bdaba4..512a255 100644 --- a/spec_test.go +++ b/spec_test.go @@ -12,11 +12,11 @@ import ( "strings" "testing" - "github.com/philandstuff/dhall-golang/v3/binary" - "github.com/philandstuff/dhall-golang/v3/core" - "github.com/philandstuff/dhall-golang/v3/imports" - "github.com/philandstuff/dhall-golang/v3/parser" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/binary" + "github.com/philandstuff/dhall-golang/v4/core" + "github.com/philandstuff/dhall-golang/v4/imports" + "github.com/philandstuff/dhall-golang/v4/parser" + "github.com/philandstuff/dhall-golang/v4/term" "github.com/pkg/errors" ) diff --git a/term/fetchable_test.go b/term/fetchable_test.go index 2a18f4b..edf05bc 100644 --- a/term/fetchable_test.go +++ b/term/fetchable_test.go @@ -6,8 +6,8 @@ import ( "net/url" "os" - "github.com/philandstuff/dhall-golang/v3/internal" - . "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/internal" + . "github.com/philandstuff/dhall-golang/v4/term" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/unmarshal.go b/unmarshal.go index abc3cec..589872f 100644 --- a/unmarshal.go +++ b/unmarshal.go @@ -5,10 +5,10 @@ import ( "fmt" "reflect" - "github.com/philandstuff/dhall-golang/v3/core" - "github.com/philandstuff/dhall-golang/v3/imports" - "github.com/philandstuff/dhall-golang/v3/parser" - "github.com/philandstuff/dhall-golang/v3/term" + "github.com/philandstuff/dhall-golang/v4/core" + "github.com/philandstuff/dhall-golang/v4/imports" + "github.com/philandstuff/dhall-golang/v4/parser" + "github.com/philandstuff/dhall-golang/v4/term" ) func isMapEntryType(recordType map[string]core.Value) bool { diff --git a/unmarshal_test.go b/unmarshal_test.go index 9d93cf3..9166d8d 100644 --- a/unmarshal_test.go +++ b/unmarshal_test.go @@ -3,9 +3,9 @@ package dhall_test import ( "reflect" - . "github.com/philandstuff/dhall-golang/v3" - "github.com/philandstuff/dhall-golang/v3/core" - "github.com/philandstuff/dhall-golang/v3/term" + . "github.com/philandstuff/dhall-golang/v4" + "github.com/philandstuff/dhall-golang/v4/core" + "github.com/philandstuff/dhall-golang/v4/term" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table"