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

panic: runtime error: index out of range #165

Open
kolloch opened this issue Aug 18, 2023 · 0 comments
Open

panic: runtime error: index out of range #165

kolloch opened this issue Aug 18, 2023 · 0 comments

Comments

@kolloch
Copy link

kolloch commented Aug 18, 2023

Heyo,

when running bazel run snapshots -- collect -v --bazelrc .bazelrc --out-path "snapshots.json", I get:

snapshots: bazel path:       /home/peter/.cache/bazelisk/downloads/bazelbuild/bazel-6.3.2-linux-x86_64/bin/bazel
snapshots: bazelrc path:     /home/peter/nexxiot/nx-arch/codemelt/target_repos/nx0/.bazelrc
snapshots: workspace path:   /home/peter/nexxiot/nx-arch/codemelt/target_repos/nx0
snapshots: query expression: //...
snapshots: out path:         /home/peter/nexxiot/nx-arch/codemelt/target_repos/nx0/snapshots.json
snapshots: collecting digests from //...
snapshots: got 79 build events
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/cognitedata/bazel-snapshots/snapshots/go/pkg/collecter.(*collecter).Collect(0xc0005c7b98?, 0xc0005c7bb8)
	external/com_cognitedata_bazel_snapshots/snapshots/go/pkg/collecter/collecter.go:100 +0xeca
main.(*collectCmd).runCollect(0xc0003996b0, 0x0?, {0xc00046a0e0?, 0x0?, 0x0?})
	external/com_cognitedata_bazel_snapshots/snapshots/go/cmd/snapshots/collect.go:131 +0x385
github.com/spf13/cobra.(*Command).execute(0xc00028cc00, {0xc00046a070, 0x7, 0x7})
	external/com_github_spf13_cobra/command.go:940 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc00028c900)
	external/com_github_spf13_cobra/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	external/com_github_spf13_cobra/command.go:992
main.Execute({0xc00012c010, 0x8, 0x8})
	external/com_cognitedata_bazel_snapshots/snapshots/go/cmd/snapshots/snapshots.go:12 +0x72
main.main()
	external/com_cognitedata_bazel_snapshots/snapshots/go/cmd/snapshots/main.go:12 +0x79

I did put this into .bazelrc in addition to my other settings:

build --legacy_important_outputs

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

1 participant