maddyblue / sqlfmt

SQL formatter with width-aware output
https://sqlfum.pt
Apache License 2.0
415 stars 22 forks source link

Missing dependency or improved docs? #34

Closed AndrewGrossman closed 6 years ago

AndrewGrossman commented 6 years ago

I'm a Go noob, so I'm not quite certain where go to from here, and the docs on building are quite sparse at this point. Any clues on getting the following error set when trying to build?


/p/t/sqlfmt> sh build.sh
+ IMG=gcr.io/hots-cockroach/sqlfmt:latest
+ go build -o sqlfmt
# github.com/cockroachdb/cockroach/pkg/sql/lex
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:10:32: undefined: ABORT
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:11:32: undefined: ACTION
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:12:32: undefined: ADD
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:13:32: undefined: ADMIN
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:14:32: undefined: ALL
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:15:32: undefined: ALTER
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:16:32: undefined: ANALYSE
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:17:32: undefined: ANALYZE
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:18:32: undefined: AND
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:19:32: undefined: ANNOTATE_TYPE
/Users/andrew/go/src/github.com/cockroachdb/cockroach/pkg/sql/lex/keywords.go:19:32: too many errors
maddyblue commented 6 years ago

See the last paragraph of the README. You have to checkout and build cockroach on your own. I'm in the process of fixing this now, but it's tricky because cockroach is complicated.

AndrewGrossman commented 6 years ago

I did build cockroach separately from master? Didn't notice any errors on the build.

On Fri, Sep 28, 2018 at 2:33 PM Matt Jibson notifications@github.com wrote:

See the last paragraph of the README. You have to checkout and build cockroach on your own. I'm in the process of fixing this now, but it's tricky because cockroach is complicated.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mjibson/sqlfmt/issues/34#issuecomment-425527329, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWBNP-2SCU8NtS00sa30ll9mvXoqogvks5ufmtggaJpZM4W_AT- .

maddyblue commented 6 years ago

Did you run make in the cockroach directory? You can verify it succeeded by executing ./cockroach there.

AndrewGrossman commented 6 years ago

Looks like I hadn't built cockroach right due to missing dependencies. Still working through it now.

On Fri, Sep 28, 2018 at 3:04 PM Matt Jibson notifications@github.com wrote:

Did you run make in the cockroach directory? You can verify it succeeded by executing ./cockroach there.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mjibson/sqlfmt/issues/34#issuecomment-425535790, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWBNDXzyEgSjJkhezgnB6MhgigKQ0_uks5ufnLQgaJpZM4W_AT- .