onflow / flow-cli

The Flow CLI is a command-line interface that provides useful utilities for building Flow applications
https://onflow.org
Apache License 2.0
206 stars 66 forks source link

Out of bounds bug on contract removal #843

Open sentry-io[bot] opened 1 year ago

sentry-io[bot] commented 1 year ago

Sentry Issue: FLOW-CLI-1J

runtime.boundsError: runtime error: slice bounds out of range [3:1]
  File "github.com/onflow/flow-cli/pkg/flowkit@v0.0.0-20230125123057-e0006d2ef2f6/config/contract.go", line 106, in (*Contracts).Remove
  File "github.com/onflow/flow-cli/internal/super/project.go", line 118, in (*project).cleanState
  File "github.com/onflow/flow-cli/internal/super/project.go", line 76, in (*project).startup
  File "github.com/onflow/flow-cli/internal/super/dev.go", line 90, in dev
  File "github.com/onflow/flow-cli/internal/command/command.go", line 141, in Command.AddToParent.func1
...
(4 additional frame(s) were not displayed)
bluesign commented 1 year ago

this is super strange bug, if you figure out I am curious.

only possibility I see is: Contract{Name: "a"}, Contract{Name: "b"}, Contract{Name: "a"}