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

Missing input error with CGO dependency #1871

Open
turmanticant opened this issue Aug 17, 2024 · 6 comments
Open

Missing input error with CGO dependency #1871

turmanticant opened this issue Aug 17, 2024 · 6 comments

Comments

@turmanticant
Copy link

turmanticant commented Aug 17, 2024

What version of gazelle are you using?

0.38.0

What version of rules_go are you using?

0.49.0

What version of Bazel are you using?

7.3.0rc2

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

Fedora linux x86_64

What did you do?

This is my code. The envoy modules all have CGO dependencies, and depend on a c++ header.

When I run gazelle, the buildfiles get generated, and seem to be correct. Inspecting the build file in the bazel cache, it is identical to the build file in the repository. But the header file doesn't get included.

package foo

import (
	"github.com/envoyproxy/envoy/contrib/golang/common/go/api"
	"github.com/envoyproxy/envoy/contrib/golang/filters/http/source/go/pkg/http"
)
func init() {
	http.RegisterHttpFilterFactoryAndConfigParser("foo", NewFilter, http.NullParser)
}

func NewFilter(config interface{}, callbacks api.FilterCallbackHandler) api.StreamFilter {
	return nil
}

This is the module it isn't resolving. The api.h is not in bazels cache.
https://github.com/envoyproxy/envoy/tree/978d911fa4b47d96b95f6c8d1ae9cd11b319caa8/contrib/golang/common/go/api_impl

What did you expect to see?

vim foo.go # contents above
go mod init foo
go: creating new go.mod: module foo
go: to add module requirements and sums:
	go mod tidy
go mod tidy
go: finding module for package github.com/envoyproxy/envoy/contrib/golang/filters/http/source/go/pkg/http
go: finding module for package github.com/envoyproxy/envoy/contrib/golang/common/go/api
go: found github.com/envoyproxy/envoy/contrib/golang/common/go/api in github.com/envoyproxy/envoy v1.31.0
go: found github.com/envoyproxy/envoy/contrib/golang/filters/http/source/go/pkg/http in github.com/envoyproxy/envoy v1.31.0
go build foo.go # success

What did you see instead?

This is the module it isn't resolving. The api.h is not in bazels cache.
https://github.com/envoyproxy/envoy/tree/978d911fa4b47d96b95f6c8d1ae9cd11b319caa8/contrib/golang/common/go/api_impl

ERROR: /home/user/.cache/bazel/_bazel_user/34c6fa7f467484e23b6742c76862b361/external/gazelle~~go_deps~com_github_envoyproxy_envoy/contrib/golang/common/go/api_impl/BUILD:5:11: GoCompilePkg external/gazelle~~go_deps~com_github_envoyproxy_envoy/contrib/golang/common/go/api_impl/api_impl.a failed: missing input file '@@gazelle~~go_deps~com_github_envoyproxy_envoy//contrib/golang/common/go/api_impl:api.h'
ERROR: /home/user/.cache/bazel/_bazel_user/34c6fa7f467484e23b6742c76862b361/external/gazelle~~go_deps~com_github_envoyproxy_envoy/contrib/golang/common/go/api_impl/BUILD:5:11: GoCompilePkg external/gazelle~~go_deps~com_github_envoyproxy_envoy/contrib/golang/common/go/api_impl/api_impl.a failed: 1 input file(s) do not exist
ERROR: /home/user/.cache/bazel/_bazel_user/34c6fa7f467484e23b6742c76862b361/external/gazelle~~go_deps~com_github_envoyproxy_envoy/contrib/golang/common/go/api_impl/BUILD:5:11 GoCompilePkg external/gazelle~~go_deps~com_github_envoyproxy_envoy/contrib/golang/common/go/api_impl/api_impl.a failed: 1 input file(s) do not exist
INFO: Elapsed time: 0.601s, Critical Path: 0.04s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED: 
@fmeum
Copy link
Member

fmeum commented Aug 18, 2024

The file is a symlink in the repo. How is it represented in the repo directory? If it is missing, then we may be doing something wrong during the download.

@turmanticant
Copy link
Author

It's missing. If I look in my bazel cache where those files are downloaded, I only see a build file and a source file. The build file still references api.h though (producing the original error).

It seems plausible that the symlink isn't be resolved when its downloaded. Would that make this a potential rules_go bug?

cd /home/user/.cache/bazel/_bazel_user/34c6fa7f467484e23b6742c76862b361/external/gazelle~~go_deps~com_github_envoyproxy_envoy/contrib/golang/common/go/api_impl/
tree
.
├── BUILD
└── capi_impl.go

@fmeum
Copy link
Member

fmeum commented Aug 18, 2024

Probably a Gazelle bug. This is how we fetch Go modules: https://github.com/bazelbuild/bazel-gazelle/blob/master/cmd/fetch_repo/module.go

This does check the dirhash of the resulting directory, so I am surprised that this verification passes with the file missing.
If you are interested, you could use a local checkout of Gazelle with local_path_override and insert some debug prints in that file to figure out where that file is lost.

@turmanticant
Copy link
Author

@fmeum I gave that a try.

Gazelle fails to build when I set a local path.

mkdir /tmp/gaz
cd !$
git clone https://github.com/bazelbuild/bazel-gazelle.git .
git checkout tags/v0.38.0

Then I pointed my project at my local copy of gazelle.

local_path_override(
    module_name = "gazelle",
    path = "/tmp/gaz"
) 

It fails to build gazelle before I put debug prints in.

ERROR: /home/user/.cache/bazel/_bazel_user/34c6fa7f467484e23b6742c76862b361/external/gazelle~/flag/BUILD.bazel:3:11: GoCompilePkg external/gazelle~/flag/flag.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@gazelle~//flag:flag) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_go~~go_sdk~collective__download_0/builder_reset/builder compilepkg -sdk external/rules_go~~go_sdk~collective__download_0 -goroot ... (remaining 25 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
compilepkg: open /home/user/.cache/bazel/_bazel_user/34c6fa7f467484e23b6742c76862b361/sandbox/linux-sandbox/251/execroot/_main/external/gazelle~/flag/flag.go: no such file or directory
Target //:gazelle failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.904s, Critical Path: 0.10s
INFO: 19 processes: 19 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

I tried sanity checking if gazelle even builds on my system. Running all tests bazel test //... fails on //internal:bazel_test (all others pass). This looks like it fails for the same reason as the above, but with a more verbose error.

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //internal:bazel_test
-----------------------------------------------------------------------------
--- FAIL: TestRunner (2.50s)
    runner_test.go:38: Computing main repo mapping: 
        Loading: 
        Loading: 0 packages loaded
        Analyzing: target //:gazelle (1 packages loaded, 0 targets configured)
        Analyzing: target //:gazelle (1 packages loaded, 0 targets configured)
        [0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
        Analyzing: target //:gazelle (126 packages loaded, 3450 targets configured)
        [1 / 1] checking cached actions
        INFO: Analyzed target //:gazelle (133 packages loaded, 11523 targets configured).
        ERROR: /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/external/bazel_gazelle/language/go/gen_std_package_list/BUILD.bazel:3:10: GoCompilePkg external/bazel_gazelle/language/go/gen_std_package_list/gen_std_package_list.a [for tool] failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//language/go/gen_std_package_list:gen_std_package_list) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src ... (remaining 21 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/sandbox/linux-sandbox/12/execroot/_main/external/bazel_gazelle/language/go/gen_std_package_list/gen_std_package_list.go: no such file or directory
        ERROR: /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/external/bazel_gazelle/pathtools/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/pathtools/pathtools.a [for tool] failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//pathtools:pathtools) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/pathtools/path.go -embedroot '' ... (remaining 18 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/sandbox/linux-sandbox/11/execroot/_main/external/bazel_gazelle/pathtools/path.go: no such file or directory
        ERROR: /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/external/bazel_gazelle/internal/version/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/internal/version/version.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//internal/version:version) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/internal/version/version.go ... (remaining 20 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/sandbox/linux-sandbox/9/execroot/_main/external/bazel_gazelle/internal/version/version.go: no such file or directory
        ERROR: /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/external/bazel_gazelle/internal/wspace/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/internal/wspace/wspace.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//internal/wspace:wspace) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/internal/wspace/finder.go ... (remaining 20 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/sandbox/linux-sandbox/10/execroot/_main/external/bazel_gazelle/internal/wspace/finder.go: no such file or directory
        ERROR: /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/external/bazel_gazelle/flag/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/flag/flag.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//flag:flag) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/flag/flag.go -embedroot '' ... (remaining 18 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/sandbox/linux-sandbox/4/execroot/_main/external/bazel_gazelle/flag/flag.go: no such file or directory
        ERROR: /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/external/bazel_gazelle/pathtools/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/pathtools/pathtools.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//pathtools:pathtools) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/pathtools/path.go -embedroot '' ... (remaining 18 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/sandbox/linux-sandbox/2/execroot/_main/external/bazel_gazelle/pathtools/path.go: no such file or directory
        Target //:gazelle failed to build
        Use --verbose_failures to see the command lines of failed build steps.
        INFO: Elapsed time: 2.448s, Critical Path: 0.43s
        INFO: 19 processes: 19 internal.
        ERROR: Build did NOT complete successfully
        ERROR: Build failed. Not running target
        exit status 1
--- FAIL: TestRunnerUpdateReposFromGoMod (0.50s)
    runner_test.go:68: Computing main repo mapping: 
        Loading: 
        Loading: 0 packages loaded
        Analyzing: target //:gazelle (1 packages loaded, 0 targets configured)
        Analyzing: target //:gazelle (1 packages loaded, 0 targets configured)
        [0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
        INFO: Analyzed target //:gazelle (1 packages loaded, 2 targets configured).
        ERROR: /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/external/bazel_gazelle/internal/wspace/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/internal/wspace/wspace.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//internal/wspace:wspace) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/internal/wspace/finder.go ... (remaining 20 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/sandbox/linux-sandbox/15/execroot/_main/external/bazel_gazelle/internal/wspace/finder.go: no such file or directory
        Target //:gazelle failed to build
        Use --verbose_failures to see the command lines of failed build steps.
        INFO: Elapsed time: 0.462s, Critical Path: 0.17s
        INFO: 15 processes: 15 internal.
        ERROR: Build did NOT complete successfully
        ERROR: Build failed. Not running target
        exit status 1
--- FAIL: TestRunnerUpdateReposCommand (1.24s)
    runner_test.go:84: Computing main repo mapping: 
        Loading: 
        Loading: 0 packages loaded
        Analyzing: target //:gazelle-update-repos (0 packages loaded, 0 targets configured)
        Analyzing: target //:gazelle-update-repos (0 packages loaded, 0 targets configured)
        [0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
        INFO: Analyzed target //:gazelle-update-repos (0 packages loaded, 2 targets configured).
        ERROR: /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/external/bazel_gazelle/flag/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/flag/flag.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//flag:flag) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/flag/flag.go -embedroot '' ... (remaining 18 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/116fb637f1ce54225c26c52abee2ed17/sandbox/linux-sandbox/30/execroot/_main/external/bazel_gazelle/flag/flag.go: no such file or directory
        Target //:gazelle-update-repos failed to build
        Use --verbose_failures to see the command lines of failed build steps.
        INFO: Elapsed time: 1.201s, Critical Path: 0.08s
        INFO: 16 processes: 16 internal.
        ERROR: Build did NOT complete successfully
        ERROR: Build failed. Not running target
        exit status 1
FAIL

Am I missing something to get these playing nice together?

@fmeum
Copy link
Member

fmeum commented Aug 20, 2024

These errors are extremely weird. What is bazel on your system?

Could you also try to run the Gazelle tests with --spawn_strategy=local?

@turmanticant
Copy link
Author

bazel on my system is just an alias for bazelisk.

This is the version of bazel that gets resolved from bazelisk. Bazelisk says its version is development, but it's 1.20.0.

bazel version
Bazelisk version: development
Build label: 7.2.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Tue Jun 25 15:53:05 2024 (1719330785)
Build timestamp: 1719330785
Build timestamp as int: 1719330785

Running with a local spawn strategy produces the same result.

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //internal:bazel_test
-----------------------------------------------------------------------------
--- FAIL: TestRunner (2.26s)
    runner_test.go:38: Computing main repo mapping: 
        Loading: 
        Loading: 0 packages loaded
        Analyzing: target //:gazelle (1 packages loaded, 0 targets configured)
        Analyzing: target //:gazelle (1 packages loaded, 0 targets configured)
        [0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
        INFO: Analyzed target //:gazelle (136 packages loaded, 11527 targets configured).
        [11 / 64] [Prepa] Creating runfiles tree bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/bazel_gazelle/language/proto/gen/gen_known_imports_/gen_known_imports.runfiles [for tool]
        ERROR: /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/external/bazel_gazelle/internal/wspace/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/internal/wspace/wspace.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//internal/wspace:wspace) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/internal/wspace/finder.go ... (remaining 20 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/sandbox/linux-sandbox/7/execroot/_main/external/bazel_gazelle/internal/wspace/finder.go: no such file or directory
        ERROR: /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/external/bazel_gazelle/flag/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/flag/flag.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//flag:flag) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/flag/flag.go -embedroot '' ... (remaining 18 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/sandbox/linux-sandbox/4/execroot/_main/external/bazel_gazelle/flag/flag.go: no such file or directory
        ERROR: /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/external/bazel_gazelle/pathtools/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/pathtools/pathtools.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//pathtools:pathtools) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/pathtools/path.go -embedroot '' ... (remaining 18 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/sandbox/linux-sandbox/6/execroot/_main/external/bazel_gazelle/pathtools/path.go: no such file or directory
        ERROR: /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/external/bazel_gazelle/internal/version/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/internal/version/version.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//internal/version:version) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/internal/version/version.go ... (remaining 20 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/sandbox/linux-sandbox/5/execroot/_main/external/bazel_gazelle/internal/version/version.go: no such file or directory
        Target //:gazelle failed to build
        Use --verbose_failures to see the command lines of failed build steps.
        INFO: Elapsed time: 2.214s, Critical Path: 0.31s
        INFO: 15 processes: 15 internal.
        ERROR: Build did NOT complete successfully
        ERROR: Build failed. Not running target
        exit status 1
--- FAIL: TestRunnerUpdateReposFromGoMod (0.38s)
    runner_test.go:68: Computing main repo mapping: 
        Loading: 
        Loading: 0 packages loaded
        Analyzing: target //:gazelle (1 packages loaded, 0 targets configured)
        Analyzing: target //:gazelle (1 packages loaded, 0 targets configured)
        [0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
        INFO: Analyzed target //:gazelle (1 packages loaded, 2 targets configured).
        ERROR: /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/external/bazel_gazelle/internal/wspace/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/internal/wspace/wspace.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//internal/wspace:wspace) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/internal/wspace/finder.go ... (remaining 20 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/sandbox/linux-sandbox/15/execroot/_main/external/bazel_gazelle/internal/wspace/finder.go: no such file or directory
        ERROR: /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/external/bazel_gazelle/flag/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/flag/flag.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//flag:flag) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/flag/flag.go -embedroot '' ... (remaining 18 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/sandbox/linux-sandbox/17/execroot/_main/external/bazel_gazelle/flag/flag.go: no such file or directory
        Target //:gazelle failed to build
        Use --verbose_failures to see the command lines of failed build steps.
        INFO: Elapsed time: 0.338s, Critical Path: 0.07s
        INFO: 11 processes: 11 internal.
        ERROR: Build did NOT complete successfully
        ERROR: Build failed. Not running target
        exit status 1
--- FAIL: TestRunnerUpdateReposCommand (1.23s)
    runner_test.go:84: Computing main repo mapping: 
        Loading: 
        Loading: 0 packages loaded
        Analyzing: target //:gazelle-update-repos (0 packages loaded, 0 targets configured)
        Analyzing: target //:gazelle-update-repos (0 packages loaded, 0 targets configured)
        [0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
        INFO: Analyzed target //:gazelle-update-repos (0 packages loaded, 2 targets configured).
        ERROR: /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/external/bazel_gazelle/internal/version/BUILD.bazel:3:11: GoCompilePkg external/bazel_gazelle/internal/version/version.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@bazel_gazelle//internal/version:version) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/bazel_gazelle/internal/version/version.go ... (remaining 20 arguments skipped)
        
        Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
        compilepkg: open /home/user/.cache/bazel/_bazel_user/ed50cbe2c8923358d98eb86895d0358f/sandbox/linux-sandbox/22/execroot/_main/external/bazel_gazelle/internal/version/version.go: no such file or directory
        Target //:gazelle-update-repos failed to build
        Use --verbose_failures to see the command lines of failed build steps.
        INFO: Elapsed time: 1.190s, Critical Path: 0.05s
        INFO: 12 processes: 12 internal.
        ERROR: Build did NOT complete successfully
        ERROR: Build failed. Not running target
        exit status 1
FAIL

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

2 participants