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

JJ: panic runtime error when trying to complete #2365

Closed
2 of 11 tasks
jscarrott opened this issue Apr 30, 2024 · 2 comments · Fixed by #2368
Closed
2 of 11 tasks

JJ: panic runtime error when trying to complete #2365

jscarrott opened this issue Apr 30, 2024 · 2 comments · Fixed by #2368
Labels
bug Something isn't working

Comments

@jscarrott
Copy link

jscarrott commented Apr 30, 2024

Current Behavior

jj new -A panic: runtime error: index out of range [2] with length 2

goroutine 9 [running]:
github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj.ActionRemoteBranches.func1({0xc000144000?, 0x2ab6e20?, 0xc00010c0c0?})
       /home/runner/work/carapace-bin/carapace-bin/pkg/actions/tools/jj/branch.go:48 +0x748
github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj.ActionRemoteBranches.ActionExecCommand.func2.1({0xc000144000?, 0x0?, 0xc000295f90?}, {0x0?, 0x0?})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/defaultActions.go:46 +0x1ec
github.com/carapace-sh/carapace.ActionExecCommandE.func1.1({{0x7fffbcd0c4e6, 0x0}, {0xc000295f90, 0x0, 0x1}, {0x3a08dc0, 0x0, 0x0}, {0xc000208a00, 0x4e, ...}, ...})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/defaultActions.go:75 +0x3be
github.com/carapace-sh/carapace.Action.Invoke({{{0x0}, {{0x0, 0x0}}, {0x0, 0x0}}, {0x0, 0x0, 0x0}, 0xc000324b80}, {{0x7fffbcd0c4e6, ...}, ...})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/action.go:124 +0x218
github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj.ActionRemoteBranches.Action.Tag.Action.TagF.func4({{0x7fffbcd0c4e6, 0x0}, {0xc000295f90, 0x0, 0x1}, {0x3a08dc0, 0x0, 0x0}, {0xc000208a00, 0x4e, ...}, ...})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/action.go:405 +0xbe
github.com/carapace-sh/carapace.Action.Invoke({{{0x0}, {{0x0, 0x0}}, {0x0, 0x0}}, {0x0, 0x0, 0x0}, 0xc000328480}, {{0x7fffbcd0c4e6, ...}, ...})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/action.go:124 +0x218
github.com/carapace-sh/carapace.batch.Invoke.func1()
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/batch.go:24 +0xa5
github.com/carapace-sh/carapace.parallelize.func1(0x0?)
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/batch.go:64 +0x4c
created by github.com/carapace-sh/carapace.parallelize in goroutine 7
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/batch.go:62 +0x85
jjjj new -A panic: runtime error: index out of range [2] with length 2

goroutine 21 [running]:
github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj.ActionRemoteBranches.func1({0xc0000c0000?, 0x2ab6e20?, 0xc00009c0c0?})
       /home/runner/work/carapace-bin/carapace-bin/pkg/actions/tools/jj/branch.go:48 +0x748
github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj.ActionRemoteBranches.ActionExecCommand.func2.1({0xc0000c0000?, 0x0?, 0xc0002a5f50?}, {0x0?, 0x0?})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/defaultActions.go:46 +0x1ec
github.com/carapace-sh/carapace.ActionExecCommandE.func1.1({{0x7ffd64e504e6, 0x0}, {0xc0002a5f50, 0x0, 0x1}, {0x3a08dc0, 0x0, 0x0}, {0xc000348500, 0x4e, ...}, ...})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/defaultActions.go:75 +0x3be
github.com/carapace-sh/carapace.Action.Invoke({{{0x0}, {{0x0, 0x0}}, {0x0, 0x0}}, {0x0, 0x0, 0x0}, 0xc000338b80}, {{0x7ffd64e504e6, ...}, ...})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/action.go:124 +0x218
github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj.ActionRemoteBranches.Action.Tag.Action.TagF.func4({{0x7ffd64e504e6, 0x0}, {0xc0002a5f50, 0x0, 0x1}, {0x3a08dc0, 0x0, 0x0}, {0xc000348500, 0x4e, ...}, ...})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/action.go:405 +0xbe
github.com/carapace-sh/carapace.Action.Invoke({{{0x0}, {{0x0, 0x0}}, {0x0, 0x0}}, {0x0, 0x0, 0x0}, 0xc00033c420}, {{0x7ffd64e504e6, ...}, ...})
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/action.go:124 +0x218
github.com/carapace-sh/carapace.batch.Invoke.func1()
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/batch.go:24 +0xa5
github.com/carapace-sh/carapace.parallelize.func1(0x0?)
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/batch.go:64 +0x4c
created by github.com/carapace-sh/carapace.parallelize in goroutine 19
       /home/runner/go/pkg/mod/github.com/carapace-sh/carapace@v1.0.0/batch.go:62 +0x85

Expected Behavior

Auto complete works

Steps To Reproduce

No response

Version

1.0.1

OS

  • Linux
  • OSX
  • Windows

Shell

  • Bash
  • Elvish
  • Fish
  • Nushell
  • Oil
  • Powershell
  • Xonsh
  • Zsh

Anything else?

I am using the latest jj version with jj parralize

@jscarrott jscarrott added the bug Something isn't working label Apr 30, 2024
@rsteube
Copy link
Member

rsteube commented Apr 30, 2024

Parsing is a bit optimistic in some actions so it is expected to panic when something is off (e.g. output format of a command has changed).
I can fix it, but since I can't reproduce the error at the moment I might filter out something relevant.
Is this a public repo? Could you share the output of jj branch list --all?

@jscarrott
Copy link
Author

Sorry I didn't see your reply until just now, my github notifications are very noisy. Looks like you managed to solve it without any more input from me, thanks! I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants