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

[Golang] Errors from zetasql parser #305

Open
pwnedbynubs opened this issue Apr 17, 2024 · 3 comments
Open

[Golang] Errors from zetasql parser #305

pwnedbynubs opened this issue Apr 17, 2024 · 3 comments

Comments

@pwnedbynubs
Copy link

pwnedbynubs commented Apr 17, 2024

Hi team,
We are looking to add this dependency as part of our testing. When running the following commands I am encountering issues not seen before when running in our ci docker container.

This is being run with alpine with the relevant lines from the dockerfile:
FROM us.gcr.io/planet-gcr/mirrors/hub.docker.com/library/golang:1.22-alpine
RUN apk --no-cache add clang clang-dev musl-dev git gcc

CGO_ENABLED=1 CXX=clang++ golangci-lint run --timeout 9m

level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildssa: failed to load package server: could not load export data: no export data for "github.com/goccy/bigquery-emulator/server""
level=error msg="Running error: can't run linter goanalysis_metalinter\nbuildssa: failed to load package server: could not load export data: no export data for "github.com/goccy/bigquery-emulator/server""
make: *** [Makefile:71: go-lint] Error 3

When running this command, there seems to be a massive blob of repeating messages that goes on longer than shown below. This also occurs when running tests locally in GoLand. I double checked the go.sum version in this repo with ours, and they match. Wondering if this is expected or if there's a way around it.

CGO_ENABLED=1 CXX=clang++ go vet ./...

github.com/goccy/go-zetasql/internal/ccall/go-zetasql/parser/parser

In file included from bind.cc:97:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/zetasql/parser/ast_node.h:25:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/zetasql/public/parse_location.h:28:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/status/statusor.h:47:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/call_once.h:34:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/internal/invoke.h:42:
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:301:36: warning: builtin __has_trivial_destructor is deprecated; use __is_trivially_destructible instead [-Wdeprecated-builtins]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:350:36: warning: builtin __has_trivial_constructor is deprecated; use __is_trivially_constructible instead [-Wdeprecated-builtins]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:494:17: warning: builtin __has_trivial_assign is deprecated; use __is_trivially_assignable instead [-Wdeprecated-builtins]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:559:8: warning: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Wdeprecated-builtins]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:560:8: warning: builtin __has_trivial_assign is deprecated; use __is_trivially_assignable instead [-Wdeprecated-builtins]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:559:8: warning: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Wdeprecated-builtins]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:571:70: note: in instantiation of static data member 'zetasql_parser_parser_absl::type_traits_internal::is_trivially_copyable_impl::kValue' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/casts.h:46:37: note: in instantiation of template class 'zetasql_parser_parser_absl::type_traits_internal::is_trivially_copyable' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/casts.h:160:45: note: in instantiation of template class 'zetasql_parser_parser_absl::internal_casts::is_bitcastable<unsigned short, short>' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/casts.h:163:23: note: while substituting prior template arguments into non-type template parameter [with Dest = uint16_t, Source = int16_t]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/internal/endian.h:188:39: note: while substituting deduced template arguments into function template 'bit_cast' [with Dest = uint16_t, Source = int16_t, $2 = (no value)]
In file included from bind.cc:97:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/zetasql/parser/ast_node.h:25:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/zetasql/public/parse_location.h:28:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/status/statusor.h:47:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/call_once.h:34:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/internal/invoke.h:42:
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:560:8: warning: builtin __has_trivial_assign is deprecated; use __is_trivially_assignable instead [-Wdeprecated-builtins]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:301:36: warning: builtin __has_trivial_destructor is deprecated; use __is_trivially_destructible instead [-Wdeprecated-builtins]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:562:7: note: in instantiation of template class 'zetasql_parser_parser_absl::is_trivially_destructible' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:571:70: note: in instantiation of static data member 'zetasql_parser_parser_absl::type_traits_internal::is_trivially_copyable_impl::kValue' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/casts.h:46:37: note: in instantiation of template class 'zetasql_parser_parser_absl::type_traits_internal::is_trivially_copyable' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/casts.h:160:45: note: in instantiation of template class 'zetasql_parser_parser_absl::internal_casts::is_bitcastable<unsigned short, short>' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/casts.h:163:23: note: while substituting prior template arguments into non-type template parameter [with Dest = uint16_t, Source = int16_t]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/internal/endian.h:188:39: note: while substituting deduced template arguments into function template 'bit_cast' [with Dest = uint16_t, Source = int16_t, $2 = (no value)]
In file included from bind.cc:97:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/zetasql/parser/ast_node.h:25:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/zetasql/public/parse_location.h:28:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/status/statusor.h:47:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/call_once.h:34:
In file included from /go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/internal/invoke.h:42:
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:559:8: warning: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Wdeprecated-builtins]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/meta/type_traits.h:571:70: note: in instantiation of static data member 'zetasql_parser_parser_absl::type_traits_internal::is_trivially_copyable_impl::kValue' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/casts.h:47:37: note: in instantiation of template class 'zetasql_parser_parser_absl::type_traits_internal::is_trivially_copyable' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/casts.h:160:45: note: in instantiation of template class 'zetasql_parser_parser_absl::internal_casts::is_bitcastable<unsigned short, short>' requested here
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/casts.h:163:23: note: while substituting prior template arguments into non-type template parameter [with Dest = uint16_t, Source = int16_t]
/go/pkg/mod/github.com/goccy/go-zetasql@v0.5.5/internal/ccall/absl/base/internal/endian.h:188:39: note: while substituting deduced template arguments into function template 'bit_cast' [with Dest = uint16_t, Source = int16_t, $2 = (no value)]

Is this something that anyone has seen before? Thank you in advance for your time and help!

@pwnedbynubs pwnedbynubs changed the title [Golang] Issue when building [Golang] Errors from zetasql parser Apr 17, 2024
@ohaibbq
Copy link
Contributor

ohaibbq commented Apr 17, 2024

I also see the zetasql warnings when debugging in GoLand, I don't have much more to say on this than that! 🤔

@hasanfatih8
Copy link

I've done the following like mentioned in README,

CGO_ENABLED=1
CXX=clang++

But I still get the same error. See log file

weird_log.txt

@goccy
Copy link
Owner

goccy commented Apr 18, 2024

I don't think the golangci-lint or go vet errors are related to bigquery-emulator .
If you specify 3rd party libraries as the target of lint, you should exclude them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants