Hi folks!
When I try to compile the project, I get the following error:
```
┬─[filmil@instance-3:~/code/bazel-experiments/wasm]─[10:05:08]
│ (g/b:main)
╰─>$ bazel run //server
INFO: Analyzed target //server:server (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/filmil/.cache/bazel/_bazel_filmil/0a5db0d5b5a6ce76c9fc901c2683ec4b/external/org_golang_google_api/internal/BUILD.bazel:3:11: GoCompilePkg external/org_golang_google_api/internal/internal.a failed: (Exit 1): builder failed: error executing command (from target @org_golang_google_api//internal:internal) bazel-out/k8-opt-exec-2B5CBBC6/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/org_golang_google_api/internal/cba.go -src ... (remaining 47 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/org_golang_google_api/internal/creds.go:89:20: undefined: google.CredentialsParams
external/org_golang_google_api/internal/creds.go:107:22: undefined: google.CredentialsFromJSONWithParams
external/org_golang_google_api/internal/creds.go:148:17: undefined: google.JWTAccessTokenSourceWithScope
external/org_golang_google_api/internal/creds.go:196:35: undefined: google.MTLSTokenURL
compilepkg: error running subcommand external/go_sdk/pkg/tool/linux_amd64/compile: exit status 2
Target //server:server failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.821s, Critical Path: 0.29s
INFO: 17 processes: 17 internal.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
┬─[filmil@instance-3:~/code/bazel-experiments/wasm]─[10:05:11]
│ (g/b:main)
╰─>$
```
Examining the file `default.go` from the external repos, one can see that the file `default.go` is obviously *not* the correct file. It's *much* older than what was released in v0.12.0.
`go.mod` declares the
need for v0.12.0 as it should, and the .bzl file generated by gazelle seems to
match. But neither of the two seem to correspond to what's being downloaded.
Ideas as to what is going on? This doesn't seem like correct behavior, and I'm not seeing an obvious issue with the bazel setup. It should be easy to corroborate by cloning my repo and running "bazel run //server from the wasm dir".
┬─[filmil@instance-3:~/code/bazel-experiments/wasm/bazel-wasm/external/org_golang_x_oauth2/google]─[10:02:19]
╰─>$ cat default.go | head -n 30
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package google
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"runtime"
"
cloud.google.com/go/compute/metadata"
"
golang.org/x/net/context"
"
golang.org/x/oauth2"
)
// DefaultClient returns an HTTP Client that uses the
// DefaultTokenSource to obtain authentication credentials.
func DefaultClient(ctx context.Context, scope ...string) (*http.Client, error) {
ts, err := DefaultTokenSource(ctx, scope...)
if err != nil {
return nil, err
}
return oauth2.NewClient(ctx, ts), nil
}
┬─[filmil@instance-3:~/code/bazel-experiments/wasm/bazel-wasm/external/org_golang_x_oauth2/google]─[10:02:30]
╰─>$