Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump godel to 2.17.0 and go to 1.13 #34

Merged
merged 3 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ working_dir: &working_dir
darwin-linux-no-cgo: &darwin-linux-no-cgo
<<: *working_dir
docker:
- image: nmiyake/go:go-darwin-linux-no-cgo-1.11.2-java-8u181-t138
- image: palantirtechnologies/go:go-darwin-linux-no-cgo-1.13-java-8u212-t23
environment:
CGO_ENABLED: 0

Expand Down
2 changes: 1 addition & 1 deletion conjureplugin/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"

"github.com/palantir/godel-conjure-plugin/conjureplugin"
"github.com/palantir/godel-conjure-plugin/conjureplugin/config/internal/v1"
v1 "github.com/palantir/godel-conjure-plugin/conjureplugin/config/internal/v1"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
)
Expand Down
2 changes: 1 addition & 1 deletion conjureplugin/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/palantir/godel-conjure-plugin/conjureplugin"
"github.com/palantir/godel-conjure-plugin/conjureplugin/config"
"github.com/palantir/godel-conjure-plugin/conjureplugin/config/internal/v1"
v1 "github.com/palantir/godel-conjure-plugin/conjureplugin/config/internal/v1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"
Expand Down
2 changes: 1 addition & 1 deletion conjureplugin/config/internal/legacy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package legacy

import (
"github.com/palantir/godel-conjure-plugin/conjureplugin/config/internal/v0"
v0 "github.com/palantir/godel-conjure-plugin/conjureplugin/config/internal/v0"
"github.com/palantir/godel/pkg/versionedconfig"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
Expand Down
2 changes: 1 addition & 1 deletion conjureplugin/config/upgradeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package config

import (
"github.com/palantir/godel-conjure-plugin/conjureplugin/config/internal/legacy"
"github.com/palantir/godel-conjure-plugin/conjureplugin/config/internal/v1"
v1 "github.com/palantir/godel-conjure-plugin/conjureplugin/config/internal/v1"
"github.com/palantir/godel/pkg/versionedconfig"
"github.com/pkg/errors"
)
Expand Down
10 changes: 7 additions & 3 deletions conjureplugin/conjureplugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,22 @@ func Run(params ConjureProjectParams, verify bool, projectDir string, stdout io.
}

if verify && len(verifyFailedIndex) > 0 {
fmt.Fprintf(stdout, "Conjure output differs from what currently exists: %v\n", verifyFailedIndex)
logMessage(stdout, fmt.Sprintf("Conjure output differs from what currently exists: %v\n", verifyFailedIndex))
for _, currKey := range verifyFailedIndex {
fmt.Fprintf(stdout, "%s%d:\n", strings.Repeat(" ", indentLen), currKey)
logMessage(stdout, fmt.Sprintf("%s%d:\n", strings.Repeat(" ", indentLen), currKey))
for _, currErrLine := range strings.Split(verifyFailedErrors[currKey], "\n") {
fmt.Fprintf(stdout, "%s%s\n", strings.Repeat(" ", indentLen*2), currErrLine)
logMessage(stdout, fmt.Sprintf("%s%s\n", strings.Repeat(" ", indentLen*2), currErrLine))
}
}
return fmt.Errorf("conjure verify failed")
}
return nil
}

func logMessage(w io.Writer, message string) {
_, _ = fmt.Fprintf(w, message)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required to get past errcheck

}

func conjureDefinitionFromParam(param ConjureProjectParam) (spec.ConjureDefinition, error) {
bytes, err := param.IRProvider.IRBytes()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions godel/config/godel.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
distributionURL=https://palantir.bintray.com/releases/com/palantir/godel/godel/2.10.0/godel-2.10.0.tgz
distributionSHA256=503074b9177d05152f3225a4bd8fa1516182f9c35d88796fbbdc975637e06c45
distributionURL=https://palantir.bintray.com/releases/com/palantir/godel/godel/2.17.0/godel-2.17.0.tgz
distributionSHA256=
6 changes: 3 additions & 3 deletions godelw
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
set -euo pipefail

# Version and checksums for godel. Values are populated by the godel "dist" task.
VERSION=2.10.0
DARWIN_CHECKSUM=2f2d8a62e598f8a7784c92a0e6325251efa347d3550187a290ab72a9ed44917c
LINUX_CHECKSUM=36f963816d8e06ab6f41711fd66a75706d3ddb376de4edef80e4fd09688c97f5
VERSION=2.17.0
DARWIN_CHECKSUM=d6294049b7edc3795d1d5517583f20c087422a8b8b52e8cbcc39ce2b575427ff
LINUX_CHECKSUM=23bca1ce55bd321686e06e0b6959ad8160ef1dfa9fe0a68a515e65d19401094d

# Downloads file at URL to destination path using wget or curl. Prints an error and exits if wget or curl is not present.
function download {
Expand Down
3 changes: 2 additions & 1 deletion integration_test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ projects:
)

ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, conjureSpecJSON)
_, err := fmt.Fprint(w, conjureSpecJSON)
require.NoError(t, err)
}))
defer ts.Close()

Expand Down
2 changes: 1 addition & 1 deletion ir-gen-cli-bundler/conjureircli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"runtime"

"github.com/mholt/archiver"
"github.com/palantir/godel-conjure-plugin/ir-gen-cli-bundler/conjureircli/internal"
conjureircli_internal "github.com/palantir/godel-conjure-plugin/ir-gen-cli-bundler/conjureircli/internal"
"github.com/pkg/errors"
)

Expand Down